Skip to content

Commit

Permalink
CLOUDP-225726: AtlasCLI Release Improvements: build .exe files only o…
Browse files Browse the repository at this point in the history
…nce (#2682)
  • Loading branch information
jeroenvervaeke authored Feb 29, 2024
1 parent cec433b commit 3928fda
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ tasks:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_files_include_filter:
- src/github.com/mongodb/mongodb-atlas-cli/bin/*.exe
- src/github.com/mongodb/mongodb-atlas-cli/dist/*.msi
remote_file: ${project}/dist/${revision}_${created_at}/
bucket: mongodb-mongocli-build
Expand Down Expand Up @@ -310,7 +311,7 @@ tasks:
TOOL_NAME: ${tool_name}
BUCKET: mongodb-mongocli-build
unstable: ${unstable}
binary: build/package/download-msi.sh
binary: build/package/download-win-binaries.sh
- func: "package"
vars:
unstable: ${unstable}
Expand Down
5 changes: 5 additions & 0 deletions build/package/.atlascli.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
project_name: atlascli

monorepo:
Expand Down Expand Up @@ -28,9 +29,13 @@ builds:
- cmd: ./build/package/atlascli_mac_notarize.sh
output: true
- <<: *build_defaults
builder: prebuilt
id: windows
goos: [windows]
goarch: [amd64]
goamd64: [v1]
prebuilt:
path: ./bin/atlas.exe
hooks:
post:
- cmd: ./build/package/windows_notarize.sh
Expand Down
4 changes: 4 additions & 0 deletions build/package/.mongocli.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ builds:
- cmd: ./build/package/mongocli_mac_notarize.sh
output: true
- <<: *build_defaults
builder: prebuilt
id: windows
goos: [windows]
goarch: [amd64]
goamd64: [v1]
prebuilt:
path: ./bin/mongocli.exe
hooks:
post:
- cmd: ./build/package/windows_notarize.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ if [[ "${unstable-}" == "-unstable" ]]; then
fi

PACKAGE_NAME="mongocli_${VERSION_NAME}_windows_x86_64.msi"
BINARY_NAME="mongocli.exe"
if [[ "${TOOL_NAME:?}" == atlascli ]]; then
PACKAGE_NAME="mongodb-atlas-cli_${VERSION_NAME}_windows_x86_64.msi"
BINARY_NAME="atlas.exe"
fi

pushd bin

echo "downloading https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${PACKAGE_NAME} into $PWD"
curl "https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${PACKAGE_NAME}" --output "${PACKAGE_NAME}"

echo "downloading https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${BINARY_NAME} into $PWD"
curl "https://${BUCKET}.s3.amazonaws.com/${project}/dist/${revision}_${created_at}/${BINARY_NAME}" --output "${BINARY_NAME}"

0 comments on commit 3928fda

Please sign in to comment.