@@ -138,17 +138,39 @@ S3_BUCKET="${S3_BUCKET:-julialangnightlies}"
138138S3_BUCKET_PREFIX=" ${S3_BUCKET_PREFIX:- bin} "
139139
140140# We generally upload to multiple upload targets
141- UPLOAD_TARGETS=(
141+ UPLOAD_TARGETS=()
142+
143+ if [[ " ${BUILDKITE_BRANCH} " == master ]] || [[ " ${BUILDKITE_BRANCH} " == release-* ]] || [[ " ${BUILDKITE_TAG} " == v* ]]; then
142144 # First, we have the canonical fully-specified upload target
143- " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} -${ARCH?} "
145+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} -${ARCH?} " )
144146
145147 # Next, we have the "majmin/latest" upload target
146- " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /${MAJMIN?} /julia-latest-${OS?} -${ARCH?} "
147- )
148+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /${MAJMIN?} /julia-latest-${OS?} -${ARCH?} " )
148149
149- # The absolute latest upload target is only for if we're on the `master` branch
150- if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
151- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /julia-latest-${OS?} -${ARCH?} " )
150+ # The absolute latest upload target is only for if we're on the `master` branch
151+ if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
152+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /julia-latest-${OS?} -${ARCH?} " )
153+ fi
154+
155+ # Finally, for compatibility, we keep on uploading x86_64 and i686 targets to folders called `x64`
156+ # and `x86`, and ending in `-linux64` and `-linux32`, although I would very much like to stop doing that.
157+ if [[ " ${ARCH} " == " x86_64" ]]; then
158+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} 64" )
159+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/${MAJMIN?} /julia-latest-${OS?} 64" )
160+
161+ # Only upload to absolute latest if we're on `master`
162+ if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
163+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/julia-latest-${OS?} 64" )
164+ fi
165+ elif [[ " ${ARCH} " == " i686" ]]; then
166+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} 32" )
167+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/${MAJMIN?} /julia-latest-${OS?} 32" )
168+
169+ # Only upload to absolute latest if we're on `master`
170+ if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
171+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/julia-latest-${OS?} 32" )
172+ fi
173+ fi
152174fi
153175
154176# If we're a pull request build, upload to a special `-prXXXX` location
@@ -157,26 +179,6 @@ if [[ "${BUILDKITE_PULL_REQUEST}" != "false" ]]; then
157179fi
158180
159181
160- # Finally, for compatibility, we keep on uploading x86_64 and i686 targets to folders called `x64`
161- # and `x86`, and ending in `-linux64` and `-linux32`, although I would very much like to stop doing that.
162- if [[ " ${ARCH} " == " x86_64" ]]; then
163- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} 64" )
164- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/${MAJMIN?} /julia-latest-${OS?} 64" )
165-
166- # Only upload to absolute latest if we're on `master`
167- if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
168- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x64/julia-latest-${OS?} 64" )
169- fi
170- elif [[ " ${ARCH} " == " i686" ]]; then
171- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} 32" )
172- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/${MAJMIN?} /julia-latest-${OS?} 32" )
173-
174- # Only upload to absolute latest if we're on `master`
175- if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
176- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/julia-latest-${OS?} 32" )
177- fi
178- fi
179-
180182# We used to name our darwin builds as `julia-*-mac64.tar.gz`, instead of `julia-*-macos-x86_64.tar.gz`.
181183# Let's copy things over to the `mac` OS name for backwards compatibility:
182184if [[ " ${OS?} " == " macos" ]] || [[ " ${OS?} " == " windows" ]]; then
0 commit comments