Skip to content

Commit 3928fda

Browse files
CLOUDP-225726: AtlasCLI Release Improvements: build .exe files only once (#2682)
1 parent cec433b commit 3928fda

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

build/ci/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ tasks:
282282
aws_key: ${aws_key}
283283
aws_secret: ${aws_secret}
284284
local_files_include_filter:
285+
- src/github.com/mongodb/mongodb-atlas-cli/bin/*.exe
285286
- src/github.com/mongodb/mongodb-atlas-cli/dist/*.msi
286287
remote_file: ${project}/dist/${revision}_${created_at}/
287288
bucket: mongodb-mongocli-build
@@ -310,7 +311,7 @@ tasks:
310311
TOOL_NAME: ${tool_name}
311312
BUCKET: mongodb-mongocli-build
312313
unstable: ${unstable}
313-
binary: build/package/download-msi.sh
314+
binary: build/package/download-win-binaries.sh
314315
- func: "package"
315316
vars:
316317
unstable: ${unstable}

build/package/.atlascli.goreleaser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
12
project_name: atlascli
23

34
monorepo:
@@ -28,9 +29,13 @@ builds:
2829
- cmd: ./build/package/atlascli_mac_notarize.sh
2930
output: true
3031
- <<: *build_defaults
32+
builder: prebuilt
3133
id: windows
3234
goos: [windows]
3335
goarch: [amd64]
36+
goamd64: [v1]
37+
prebuilt:
38+
path: ./bin/atlas.exe
3439
hooks:
3540
post:
3641
- cmd: ./build/package/windows_notarize.sh

build/package/.mongocli.goreleaser.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ builds:
2828
- cmd: ./build/package/mongocli_mac_notarize.sh
2929
output: true
3030
- <<: *build_defaults
31+
builder: prebuilt
3132
id: windows
3233
goos: [windows]
3334
goarch: [amd64]
35+
goamd64: [v1]
36+
prebuilt:
37+
path: ./bin/mongocli.exe
3438
hooks:
3539
post:
3640
- cmd: ./build/package/windows_notarize.sh

build/package/download-msi.sh renamed to build/package/download-win-binaries.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ if [[ "${unstable-}" == "-unstable" ]]; then
2626
fi
2727

2828
PACKAGE_NAME="mongocli_${VERSION_NAME}_windows_x86_64.msi"
29+
BINARY_NAME="mongocli.exe"
2930
if [[ "${TOOL_NAME:?}" == atlascli ]]; then
3031
PACKAGE_NAME="mongodb-atlas-cli_${VERSION_NAME}_windows_x86_64.msi"
32+
BINARY_NAME="atlas.exe"
3133
fi
3234

3335
pushd bin
3436

3537
echo "downloading https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${PACKAGE_NAME} into $PWD"
3638
curl "https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${PACKAGE_NAME}" --output "${PACKAGE_NAME}"
39+
40+
echo "downloading https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${BINARY_NAME} into $PWD"
41+
curl "https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${BINARY_NAME}" --output "${BINARY_NAME}"

0 commit comments

Comments
 (0)