File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,22 +79,15 @@ jobs:
7979 shell : bash
8080 run : |
8181 shopt -s nullglob globstar
82- src =(
83- cross-platform/src-tauri/target/release/bundle/**/*.exe
82+ installer_candidates =(
83+ cross-platform/src-tauri/target/release/bundle/**/*[Ss][Ee][Tt][Uu][Pp]* .exe
8484 cross-platform/src-tauri/target/release/bundle/**/*.msi
8585 )
86- if [ ${#src [@]} -eq 0 ]; then
87- echo "No Windows installer found under cross-platform/src-tauri/target/release/bundle"
86+ if [ ${#installer_candidates [@]} -eq 0 ]; then
87+ echo "No Windows installer-like artifacts found under cross-platform/src-tauri/target/release/bundle (expected *setup*.exe or .msi) "
8888 exit 1
8989 fi
90- installer_path="${src[0]}"
91- for candidate in "${src[@]}"; do
92- base_name="$(basename "$candidate")"
93- if [[ "$base_name" == *setup*.exe || "$base_name" == *.msi ]]; then
94- installer_path="$candidate"
95- break
96- fi
97- done
90+ installer_path="${installer_candidates[0]}"
9891 installer_ext="${installer_path##*.}"
9992 installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
10093 cp "$installer_path" "$installer_name"
Original file line number Diff line number Diff line change @@ -86,22 +86,15 @@ jobs:
8686 shell : bash
8787 run : |
8888 shopt -s nullglob globstar
89- src =(
90- cross-platform/src-tauri/target/release/bundle/**/*.exe
89+ installer_candidates =(
90+ cross-platform/src-tauri/target/release/bundle/**/*[Ss][Ee][Tt][Uu][Pp]* .exe
9191 cross-platform/src-tauri/target/release/bundle/**/*.msi
9292 )
93- if [ ${#src [@]} -eq 0 ]; then
94- echo "No Windows installer found under cross-platform/src-tauri/target/release/bundle"
93+ if [ ${#installer_candidates [@]} -eq 0 ]; then
94+ echo "No Windows installer-like artifacts found under cross-platform/src-tauri/target/release/bundle (expected *setup*.exe or .msi) "
9595 exit 1
9696 fi
97- installer_path="${src[0]}"
98- for candidate in "${src[@]}"; do
99- base_name="$(basename "$candidate")"
100- if [[ "$base_name" == *setup*.exe || "$base_name" == *.msi ]]; then
101- installer_path="$candidate"
102- break
103- fi
104- done
97+ installer_path="${installer_candidates[0]}"
10598 installer_ext="${installer_path##*.}"
10699 installer_name="PinStick-${APP_VERSION}-windows.${installer_ext}"
107100 cp "$installer_path" "$installer_name"
You can’t perform that action at this time.
0 commit comments