Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3965,6 +3965,7 @@ functions:
PACKAGE_VARIANT: ${package_variant}
MACOS_NOTARY_KEY: ${macos_notary_key}
MACOS_NOTARY_SECRET: ${macos_notary_secret}
REQUESTER: ${requester}
verify_artifact:
- command: expansions.write
type: setup
Expand Down
16 changes: 13 additions & 3 deletions .evergreen/sign-packaged-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ export NODE_JS_VERSION=${NODE_JS_VERSION}
export ARTIFACT_URL_FILE="$PWD/../artifact-url.txt"

source .evergreen/setup-env.sh
notarymode="notarizeAndSign"

if [ "$REQUESTER" == "github_pr" ]; then
notarymode="sign"
fi

(mkdir -p dist/ && cd dist/ && bash "$BASEDIR/retry-with-backoff.sh" curl -sSfLO --url "$(cat "$ARTIFACT_URL_FILE")")
ls -lh dist/
Expand All @@ -24,15 +29,20 @@ if [ "$(uname)" == Darwin ]; then
# notarize the client
./darwin_amd64/macnotary \
-f "$FILE" \
-m notarizeAndSign -u https://dev.macos-notary.build.10gen.cc/api \
-m $notarymode -u https://dev.macos-notary.build.10gen.cc/api \
-b com.mongodb.mongosh \
-e config/macos-entitlements.xml \
-o "$FILE-signed.zip"
mv -v "$FILE-signed.zip" "$FILE"

# Verify signing
# Verify signing and notarization
unzip "$FILE"
spctl -a -vvv -t install mongosh-*/bin/mongosh
if [ "$notarymode" == "sign" ]; then
codesign --verify --deep --strict --verbose=2 mongosh-*/bin/mongosh
else
spctl -a -vvv -t install mongosh-*/bin/mongosh
fi

else
npm run evergreen-release sign
fi
Expand Down
Loading