Skip to content

Commit

Permalink
ci: try to fix create-dmg woes by retrying until it succeeds... yay
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 11, 2024
1 parent e2b1a2c commit e90bb87
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ci/osx-package.deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ fi
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
echo waiting...; while pgrep XProtect; do sleep 3; done;

sudo create-dmg \
max_tries=10
i=0
until sudo create-dmg \
--volname "ossia score $TAG" \
--window-pos 200 120 \
--window-size 800 400 \
Expand All @@ -62,6 +64,13 @@ sudo create-dmg \
--hide-extension "ossia score.app" \
--filesystem APFS \
'score.dmg' 'ossia score.app'
do
if [[ $i -eq $max_tries ]]; then
echo 'Error: create-dmg did not succeed even after 10 tries.'
exit 1
fi
((i++))
done

sudo chown "$(whoami)" ./*.dmg

Expand Down

0 comments on commit e90bb87

Please sign in to comment.