Skip to content

Commit b5c20fe

Browse files
committed
fix: goreleaser improvements
1 parent ac4d8c1 commit b5c20fe

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

build/ci/evergreen.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ functions:
304304
export PATH="./bin:${go_bin}:$PATH"
305305
export GITHUB_TOKEN=${github_token}
306306
307-
${goreleaser_cmd|goreleaser --rm-dist --snapshot}
307+
${goreleaser_cmd|goreleaser --rm-dist --snapshot -p 1}
308308
EOF_BUILD_SH
309309
- command: shell.exec
310310
type: test
@@ -1027,7 +1027,7 @@ tasks:
10271027
binary: build/package/download-msi.sh
10281028
- func: "package"
10291029
vars:
1030-
goreleaser_cmd: goreleaser --rm-dist --release-notes CHANGELOG.md
1030+
goreleaser_cmd: goreleaser --rm-dist --release-notes CHANGELOG.md -p 1
10311031
- func: "rename pkg"
10321032
- command: archive.targz_pack
10331033
params:

build/package/mac_notarize.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ set -Eeou pipefail
2020
# This depends on binaries being generated in a goreleaser manner and gon being set up.
2121
# goreleaser should already take care of calling this script as a hook.
2222

23-
echo "notarizing x86_64"
24-
gon -log-level=error gon_x86_64.json
23+
if [[ -f "./dist/macos_darwin_amd64/bin/mongocli"&& ! -f "./dist/mongocli_macos_signed_x86_64.zip" ]]; then
24+
echo "notarizing x86_64"
25+
gon -log-level=error gon_x86_64.json
2526

26-
echo "replacing original file"
27-
unzip -od ./dist/macos_darwin_amd64/bin/ ./dist/mongocli_macos_signed_x86_64.zip
27+
echo "replacing original file"
28+
unzip -od ./dist/macos_darwin_amd64/bin/ ./dist/mongocli_macos_signed_x86_64.zip
29+
fi
2830

29-
echo "notarizing arm64"
30-
gon -log-level=error gon_arm64.json
31+
if [[ -f "./dist/macos_darwin_arm64/bin/mongocli" && ! -f "./dist/mongocli_macos_signed_arm64.zip" ]]; then
32+
echo "notarizing arm64"
33+
gon -log-level=error gon_arm64.json
3134

32-
echo "replacing original file"
33-
unzip -od ./dist/macos_darwin_arm64/bin/ ./dist/mongocli_macos_signed_arm64.zip
35+
echo "replacing original file"
36+
unzip -od ./dist/macos_darwin_arm64/bin/ ./dist/mongocli_macos_signed_arm64.zip
37+
fi

0 commit comments

Comments
 (0)