2020-11-14 17:30:45 +00:00
|
|
|
#!/bin/sh
|
2012-08-02 20:35:41 +00:00
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
2020-11-14 17:30:45 +00:00
|
|
|
# shellcheck disable=SC2154
|
|
|
|
[ -z "$SIGN" ] && \
|
|
|
|
echo "No SIGN environment var. Skipping codesign." >&2 && \
|
2012-08-02 20:35:41 +00:00
|
|
|
exit 0
|
|
|
|
|
2020-01-22 03:38:11 +00:00
|
|
|
# All macOS executable binaries in the bundle must be codesigned with the
|
|
|
|
# hardened runtime enabled.
|
|
|
|
# See https://github.com/nodejs/node/pull/31459
|
|
|
|
|
2020-11-14 17:30:45 +00:00
|
|
|
# shellcheck disable=SC2154
|
2020-01-22 03:38:11 +00:00
|
|
|
codesign \
|
|
|
|
--sign "$SIGN" \
|
|
|
|
--entitlements tools/osx-entitlements.plist \
|
|
|
|
--options runtime \
|
|
|
|
--timestamp \
|
|
|
|
"$PKGDIR"/bin/node
|