diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9c50703..b3dc2f35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -107,7 +107,7 @@ jobs: # Instead of hardcoding which targets to build and package, we'll # package everything that's got en entry in the `bundler.toml` file run: | - packages=$(awk 'match($0, /^\s*\["?([^"]+)"?]/, matches) { print matches[1] }' bundler.toml) + packages=$(cargo xtask known-packages) for package in $packages; do cargo xtask bundle "$package" --bundle-vst3 --release done diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 27082efe..9dda1610 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -37,6 +37,9 @@ fn main() -> Result<()> { bundle(&package, other_args) } + // This is only meant to be used by the CI, since using awk for this can be a bit spotty on + // macOS + "known-packages" => list_known_packages(), _ => bail!("Unknown command '{command}'\n\n{USAGE_STRING}"), } } @@ -124,6 +127,18 @@ fn bundle(package: &str, mut args: Vec) -> Result<()> { Ok(()) } +/// This lists the packages configured in `bundler.toml`. This is only used as part of the CI when +/// bundling plugins. +fn list_known_packages() -> Result<()> { + if let Some(config) = load_bundler_config()? { + for package in config.keys() { + println!("{package}"); + } + } + + Ok(()) +} + /// Load the `bundler.toml` file, if it exists. If it does exist but it cannot be parsed, then this /// will return an error. fn load_bundler_config() -> Result> {