File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -3965,6 +3965,7 @@ functions:
39653965 PACKAGE_VARIANT : ${package_variant}
39663966 MACOS_NOTARY_KEY : ${macos_notary_key}
39673967 MACOS_NOTARY_SECRET : ${macos_notary_secret}
3968+ REQUESTER : ${requester}
39683969 verify_artifact :
39693970 - command : expansions.write
39703971 type : setup
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ export NODE_JS_VERSION=${NODE_JS_VERSION}
66export ARTIFACT_URL_FILE=" $PWD /../artifact-url.txt"
77
88source .evergreen/setup-env.sh
9+ notarymode=" notarizeAndSign"
10+
11+ if [ " $REQUESTER " == " github_pr" ]; then
12+ notarymode=" sign"
13+ fi
914
1015(mkdir -p dist/ && cd dist/ && bash " $BASEDIR /retry-with-backoff.sh" curl -sSfLO --url " $( cat " $ARTIFACT_URL_FILE " ) " )
1116ls -lh dist/
@@ -24,15 +29,20 @@ if [ "$(uname)" == Darwin ]; then
2429 # notarize the client
2530 ./darwin_amd64/macnotary \
2631 -f " $FILE " \
27- -m notarizeAndSign -u https://dev.macos-notary.build.10gen.cc/api \
32+ -m $notarymode -u https://dev.macos-notary.build.10gen.cc/api \
2833 -b com.mongodb.mongosh \
2934 -e config/macos-entitlements.xml \
3035 -o " $FILE -signed.zip"
3136 mv -v " $FILE -signed.zip" " $FILE "
3237
33- # Verify signing
38+ # Verify signing and notarization
3439 unzip " $FILE "
35- spctl -a -vvv -t install mongosh-* /bin/mongosh
40+ if [ " $notarymode " == " sign" ]; then
41+ codesign --verify --deep --strict --verbose=2 mongosh-* /bin/mongosh
42+ else
43+ spctl -a -vvv -t install mongosh-* /bin/mongosh
44+ fi
45+
3646else
3747 npm run evergreen-release sign
3848fi
You can’t perform that action at this time.
0 commit comments