mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
Correct MacOS CPack configuration (#334)
* Make the `repeat_hdiutil.sh` script more clear about retry counts. * Change usage of `$@` to `"$@"` to pass args correctly * Fix `CPACK_COMMAND_HDIUTIL` generation * Switch `package.sh` to use `$GITHUB_WORKSPACE` * Make `repeat_hdiutil.sh` executable * Remove `set +x` and `set -x` options Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
parent
c927f17ce9
commit
63e882ff96
@ -2,19 +2,21 @@
|
||||
|
||||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
||||
|
||||
set -uxo pipefail
|
||||
set -uo pipefail
|
||||
|
||||
max_retry=5
|
||||
counter=0
|
||||
num_secs_await_retry=1
|
||||
|
||||
until /usr/bin/hdiutil ""$*"" -debug; do
|
||||
echo "Trying: " /usr/bin/hdiutil "$@"
|
||||
|
||||
until /usr/bin/hdiutil "$@"; do
|
||||
sleep $num_secs_await_retry
|
||||
if [[ $counter -eq $max_retry ]]; then
|
||||
echo "CPack failed despite retry attempts!"
|
||||
exit 1
|
||||
else
|
||||
echo "Trying CPack hdiutil call again. Try #$counter"
|
||||
echo "Trying CPack hdiutil call again. Retry attempt #$counter"
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
|
@ -9,8 +9,10 @@ cd build
|
||||
if [[ "${OSTYPE}" == msys* && ${GIT_BRANCH} == release* ]]; then # Windows
|
||||
cmake --build . --target innosetup --config "${AUDACITY_BUILD_TYPE}"
|
||||
else
|
||||
export CPACK_COMMAND_HDIUTIL="./macos/repeat_hdiutil.sh"
|
||||
cpack -C "${AUDACITY_BUILD_TYPE}" --verbose
|
||||
# GITHUB_WORKSPACE is set by the checkout action in the action workflow configuration
|
||||
export CPACK_COMMAND_HDIUTIL="${GITHUB_WORKSPACE}/scripts/ci/macos/repeat_hdiutil.sh"
|
||||
chmod +x $CPACK_COMMAND_HDIUTIL
|
||||
cpack -C "${AUDACITY_BUILD_TYPE}" -D CPACK_COMMAND_HDIUTIL="${CPACK_COMMAND_HDIUTIL}" --verbose
|
||||
fi
|
||||
|
||||
# Remove the temporary directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user