assemble.sh now returns exit code from Installomator.sh

This commit is contained in:
Armin Briegel
2022-09-02 11:41:33 +02:00
parent 449276e587
commit 438191e4d3
2 changed files with 31 additions and 0 deletions

View File

@@ -120,6 +120,8 @@ chmod +x $destination_file
# run script with remaining arguments
if [[ $runScript -eq 1 ]]; then
$destination_file "$@"
exit_code=$?
echo "exit_code is $exit_code"
fi
# copy the script to root of repo when flag is set
@@ -186,3 +188,5 @@ if [[ $notarizePkg -eq 1 ]]; then
echo "# Stapling $productpath"
xcrun stapler staple "$productpath"
fi
exit $exit_code

27
utils/test-pr.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/zsh
# this will checkout and test a pr
# requires the gh tool and the cwd to be the repo base
#
# usage: utils/test-pr.sh <pr_num> <label>
pr_num=${1:?"arg 1 is the PR number"}
label=${2:?"arg 2 is label"}
gh pr checkout $pr_num -b "pr/$pr_num"
if ! utils/assemble.sh $label; then
echo "something went wrong, stopping here"
else
echo
echo "All good! merging..."
echo
# git checkout main
# git merge "pr/$pr_num" -m "new label: $label"
# git branch -d "pr/$pr_num"
# gh pr comment $pr_num --body 'Thank you!'
fi