diff --git a/scripts/package/package-all.sh b/scripts/package/package-all.sh index eaecdbc7e..29168cb15 100755 --- a/scripts/package/package-all.sh +++ b/scripts/package/package-all.sh @@ -107,7 +107,16 @@ function build_setup() { else env AW_VERSION=$version_no_prefix "$innosetupdir/iscc.exe" scripts/package/activitywatch-setup.iss fi - mv dist/activitywatch-setup.exe dist/$filename + # The Research Edition patcher rewrites OutputBaseFilename in the .iss + # (activitywatch-research[-tauri]-setup), so resolve the produced file + # instead of hardcoding the standard name. dist/ is fresh at this point, + # so exactly one setup exe must exist. + setup_src=(dist/activitywatch*-setup.exe) + if [ ${#setup_src[@]} -ne 1 ] || [ ! -f "${setup_src[0]}" ]; then + echo "ERROR: expected exactly one dist/activitywatch*-setup.exe, got: ${setup_src[*]}" + exit 1 + fi + mv "${setup_src[0]}" "dist/$filename" echo "Setup built!" }