From 0fba65e86e73de399aa9597844f23ba01186e740 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:00:12 -0500 Subject: [PATCH] build(manager): detect platform before shifting the arg array in package action (#1500) * fix(manager): detect platform before shifting the arg array in the package action * Update package.action.sh * Update src/server_manager/electron_app/package.action.sh Co-authored-by: Vinicius Fortuna * Update src/server_manager/electron_app/package.action.sh Co-authored-by: Vinicius Fortuna --------- Co-authored-by: Vinicius Fortuna --- src/server_manager/electron_app/package.action.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server_manager/electron_app/package.action.sh b/src/server_manager/electron_app/package.action.sh index eac7d0e3a..b9bb214c1 100755 --- a/src/server_manager/electron_app/package.action.sh +++ b/src/server_manager/electron_app/package.action.sh @@ -73,6 +73,7 @@ function finish_yaml_files() { function main() { declare staging_percentage=100 declare version_name='0.0.0-debug' + for i in "$@"; do case "${i}" in --buildMode=*) @@ -91,10 +92,11 @@ function main() { echo "Unknown option: ${i}" exit 1 ;; - *) ;; + *) # Only supports having one positional argument. + PLATFORM="${i}" + ;; esac done - PLATFORM="${1?Platform missing}" run_action server_manager/electron_app/build --buildMode="${BUILD_MODE}" --versionName="${version_name}" package_electron finish_yaml_files "${staging_percentage}"