Avoid awk on macOS
I was hoping they'd have gawk installed, but I guess not.
This commit is contained in:
parent
9b41017f36
commit
c5c966c0cc
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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<String>) -> 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<Option<BundlerConfig>> {
|
||||
|
|
Loading…
Reference in a new issue