diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/osx-codesign.sh | 9 | ||||
-rwxr-xr-x | tools/osx-notarize.sh | 14 | ||||
-rw-r--r-- | tools/osx-productsign.sh | 10 |
3 files changed, 17 insertions, 16 deletions
diff --git a/tools/osx-codesign.sh b/tools/osx-codesign.sh index 7ca80ca7462..346afdbe66e 100644 --- a/tools/osx-codesign.sh +++ b/tools/osx-codesign.sh @@ -1,17 +1,18 @@ -#!/bin/bash +#!/bin/sh set -x set -e -if [ "X$SIGN" == "X" ]; then - echo "No SIGN environment var. Skipping codesign." >&2 +# shellcheck disable=SC2154 +[ -z "$SIGN" ] && \ + echo "No SIGN environment var. Skipping codesign." >&2 && \ exit 0 -fi # All macOS executable binaries in the bundle must be codesigned with the # hardened runtime enabled. # See https://github.com/nodejs/node/pull/31459 +# shellcheck disable=SC2154 codesign \ --sign "$SIGN" \ --entitlements tools/osx-entitlements.plist \ diff --git a/tools/osx-notarize.sh b/tools/osx-notarize.sh index 97bb0912722..07d3e20e7e9 100755 --- a/tools/osx-notarize.sh +++ b/tools/osx-notarize.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Uses gon, from https://github.com/mitchellh/gon, to notarize a generated node-<version>.pkg file # with Apple for installation on macOS Catalina and later as validated by Gatekeeper. @@ -8,18 +8,16 @@ set -e gon_version="0.2.2" gon_exe="${HOME}/.gon/gon_${gon_version}" -__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" pkgid="$1" -if [ "X${pkgid}" == "X" ]; then - echo "Usage: $0 <pkgid>" +[ -z "$pkgid" ] && \ + echo "Usage: $0 <pkgid>" \ exit 1 -fi -if [ "X$NOTARIZATION_ID" == "X" ]; then - echo "No NOTARIZATION_ID environment var. Skipping notarization." +# shellcheck disable=SC2154 +[ -z "$NOTARIZATION_ID" ] && \ + echo "No NOTARIZATION_ID environment var. Skipping notarization." \ exit 0 -fi set -x diff --git a/tools/osx-productsign.sh b/tools/osx-productsign.sh index 491e3fde62f..b1daedcf7ee 100644 --- a/tools/osx-productsign.sh +++ b/tools/osx-productsign.sh @@ -1,12 +1,14 @@ -#!/bin/bash +#!/bin/sh set -x set -e -if [ "X$SIGN" == "X" ]; then - echo "No SIGN environment var. Skipping codesign." >&2 +# shellcheck disable=SC2154 +[ -z "$SIGN" ] && \ + echo "No SIGN environment var. Skipping codesign." >&2 && \ exit 0 -fi +# shellcheck disable=SC2154 productsign --sign "$SIGN" "$PKG" "$PKG"-SIGNED +# shellcheck disable=SC2154 mv "$PKG"-SIGNED "$PKG" |