Skip to content

Commit

Permalink
CI macOS: do not fail on sign if no keys
Browse files Browse the repository at this point in the history
If no signing keys available, the expected behavior is rather to skip
signing instead of failing, which is unintended because of shell check
for unset variables (set -u).
  • Loading branch information
MartinPulec committed Mar 22, 2024
1 parent a66ee61 commit 1c7c3ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/macOS/sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ set -x

APP=${1?Appname must be passed as a first argument}

if [ -z "$KEY_CHAIN" ] || [ -z "$KEY_CHAIN_PASS" ] ||
{ [ -z "$notarytool_credentials" ] && [ ! $sign_only ]; }; then
if [ -z "${KEY_CHAIN-}" ] || [ -z "${KEY_CHAIN_PASS-}" ] ||
{ [ -z "${notarytool_credentials-}" ] && [ ! $sign_only ]; }
then
echo "Could not find key to sign the application" 2>&1
if [ "$GITHUB_REPOSITORY" = "CESNET/UltraGrid" ] && ! expr "$GITHUB_REF" : refs/pull >/dev/null; then
exit 1
Expand Down

0 comments on commit 1c7c3ac

Please sign in to comment.