From 1a2adc561d1b827110fddd3b08c28e31a5edc182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Youn=20M=C3=A9lois?= Date: Fri, 5 Jul 2024 05:03:30 +0200 Subject: [PATCH] ci: fix varible outside scope of json --- .github/workflows/package.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package.sh b/.github/workflows/package.sh index c93dd20..ee445ee 100755 --- a/.github/workflows/package.sh +++ b/.github/workflows/package.sh @@ -26,14 +26,15 @@ for package_dir in "$workspace_dir/src/*/*"; do target_file=$(sed 's/-/_/g' <<< $package_name).wasm target="$workspace_dir/target/wasm32-unknown-unknown/release/$target_file" + # Get the packaged name of the extension + packaged_name=${package_name:7} + packaged_name=${packaged_name/-/.} + # Package the extension only if the wasm file exists if [ -f $target ]; then # Copy the wasm file to the package directory cp $target $package_dir/res/extension.wasm - packaged_name=${package_name:7} - packaged_name=${packaged_name/-/.} - # Zip the extension and manifest tar --sort=name \ --mtime='UTC 2024-01-01' \