Skip to content

Commit edc8bf9

Browse files
authored
MONGOCRYPT-764 add latest downloads (#982)
1 parent e84f84f commit edc8bf9

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.evergreen/config.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,15 @@ tasks:
808808
# the "fetch source" step detected a release tag on HEAD, so we
809809
# prepare a local file for upload to a location based on the tag
810810
cp -a libmongocrypt-all.tar.gz libmongocrypt-all-${tag_upload_location}.tar.gz
811+
812+
if [[ "$tag_upload_location" = *-* ]]; then
813+
# Unstable release, like 1.1.0-beta1 or 1.0.1-rc0.
814+
mkdir unstable
815+
cp -a libmongocrypt-all.tar.gz unstable/libmongocrypt-all-${tag_upload_location}.tar.gz
816+
else
817+
mkdir stable
818+
cp -a libmongocrypt-all.tar.gz stable/libmongocrypt-all-${tag_upload_location}.tar.gz
819+
fi
811820
fi
812821
- command: s3.put
813822
params:
@@ -834,10 +843,32 @@ tasks:
834843
remote_file: 'libmongocrypt/all/${tag_upload_location}/libmongocrypt-all.tar.gz'
835844
bucket: mciuploads
836845
permissions: public-read
837-
optional: true
846+
optional: true # Do not fail task if `local_file` does not exist. `local_file` only exists for tagged release.
838847
display_name: 'libmongocrypt-all-${tag_upload_location}.tar.gz'
839848
local_file: 'libmongocrypt-all-${tag_upload_location}.tar.gz'
840849
content_type: '${content_type|application/x-gzip}'
850+
- command: s3.put
851+
params:
852+
aws_key: '${aws_key}'
853+
aws_secret: '${aws_secret}'
854+
remote_file: 'libmongocrypt/all/latest/stable/libmongocrypt-all.tar.gz'
855+
bucket: mciuploads
856+
permissions: public-read
857+
optional: true # Do not fail task if `local_file` does not exist. `local_file` only exists for stable release.
858+
display_name: 'stable/libmongocrypt-all-${tag_upload_location}.tar.gz'
859+
local_file: 'stable/libmongocrypt-all-${tag_upload_location}.tar.gz'
860+
content_type: '${content_type|application/x-gzip}'
861+
- command: s3.put
862+
params:
863+
aws_key: '${aws_key}'
864+
aws_secret: '${aws_secret}'
865+
remote_file: 'libmongocrypt/all/latest/unstable/libmongocrypt-all.tar.gz'
866+
bucket: mciuploads
867+
permissions: public-read
868+
optional: true # Do not fail task if `local_file` does not exist. `local_file` only exists for unstable release.
869+
display_name: 'unstable/libmongocrypt-all-${tag_upload_location}.tar.gz'
870+
local_file: 'unstable/libmongocrypt-all-${tag_upload_location}.tar.gz'
871+
content_type: '${content_type|application/x-gzip}'
841872

842873
- name: publish-packages
843874
depends_on: build-and-test-and-upload

0 commit comments

Comments
 (0)