@@ -140,7 +140,7 @@ S3_BUCKET_PREFIX="${S3_BUCKET_PREFIX:-bin}"
140140# We generally upload to multiple upload targets
141141UPLOAD_TARGETS=()
142142
143- if [[ " ${BUILDKITE_BRANCH} " == master ]] || [[ " ${BUILDKITE_BRANCH} " == release-* ]] || [[ " ${BUILDKITE_TAG:- } " == v* ]]; then
143+ if [[ " ${BUILDKITE_BRANCH} " == master ]] || [[ " ${BUILDKITE_BRANCH} " == release-* ]] || [[ " ${BUILDKITE_TAG:- } " == v* ]] || [[ " ${BUILDKITE_PIPELINE_SLUG} " == " julia-buildkite " ]] ; then
144144 # First, we have the canonical fully-specified upload target
145145 UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /${MAJMIN?} /julia-${TAR_VERSION?} -${OS?} -${ARCH?} " )
146146
@@ -171,51 +171,50 @@ if [[ "${BUILDKITE_BRANCH}" == master ]] || [[ "${BUILDKITE_BRANCH}" == release-
171171 UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /x86/julia-latest-${OS?} 32" )
172172 fi
173173 fi
174- fi
175-
176- # If we're a pull request build, upload to a special `-prXXXX` location
177- if [[ " ${BUILDKITE_PULL_REQUEST} " != " false" ]]; then
178- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /julia-pr${BUILDKITE_PULL_REQUEST} -${OS?} -${ARCH?} " )
179- fi
180174
175+ # We used to name our darwin builds as `julia-*-mac64.tar.gz`, instead of `julia-*-macos-x86_64.tar.gz`.
176+ # Let's copy things over to the `mac` OS name for backwards compatibility:
177+ if [[ " ${OS?} " == " macos" ]] || [[ " ${OS?} " == " windows" ]]; then
178+ if [[ " ${OS?} " == " macos" ]]; then
179+ FOLDER_OS=" mac"
180+ SHORT_OS=" mac"
181+ elif [[ " ${OS?} " == " windows" ]]; then
182+ FOLDER_OS=" winnt"
183+ SHORT_OS=" win"
184+ else
185+ FOLDER_OS=" ${OS} "
186+ SHORT_OS=" ${OS} "
187+ fi
181188
182- # We used to name our darwin builds as `julia-*-mac64.tar.gz`, instead of `julia-*-macos-x86_64.tar.gz`.
183- # Let's copy things over to the `mac` OS name for backwards compatibility:
184- if [[ " ${OS?} " == " macos" ]] || [[ " ${OS?} " == " windows" ]]; then
185- if [[ " ${OS?} " == " macos" ]]; then
186- FOLDER_OS=" mac"
187- SHORT_OS=" mac"
188- elif [[ " ${OS?} " == " windows" ]]; then
189- FOLDER_OS=" winnt"
190- SHORT_OS=" win"
191- else
192- FOLDER_OS=" ${OS} "
193- SHORT_OS=" ${OS} "
194- fi
195-
196- if [[ " ${ARCH} " == " x86_64" ]]; then
197- FOLDER_ARCH=" x64"
198- SHORT_ARCH=" 64"
199- elif [[ " ${ARCH} " == " i686" ]]; then
200- FOLDER_ARCH=" x86"
201- SHORT_ARCH=" 32"
202- else
203- FOLDER_ARCH=" ${ARCH} "
204- SHORT_ARCH=" ${ARCH} "
205- fi
189+ if [[ " ${ARCH} " == " x86_64" ]]; then
190+ FOLDER_ARCH=" x64"
191+ SHORT_ARCH=" 64"
192+ elif [[ " ${ARCH} " == " i686" ]]; then
193+ FOLDER_ARCH=" x86"
194+ SHORT_ARCH=" 32"
195+ else
196+ FOLDER_ARCH=" ${ARCH} "
197+ SHORT_ARCH=" ${ARCH} "
198+ fi
206199
207- # First, we have the canonical fully-specified upload target
208- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /${MAJMIN?} /julia-${TAR_VERSION?} -${SHORT_OS}${SHORT_ARCH} " )
200+ # First, we have the canonical fully-specified upload target
201+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /${MAJMIN?} /julia-${TAR_VERSION?} -${SHORT_OS}${SHORT_ARCH} " )
209202
210- # Next, we have the "majmin/latest" upload target
211- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /${MAJMIN?} /julia-latest-${SHORT_OS}${SHORT_ARCH} " )
203+ # Next, we have the "majmin/latest" upload target
204+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /${MAJMIN?} /julia-latest-${SHORT_OS}${SHORT_ARCH} " )
212205
213- # If we're on `master` and we're uploading, we consider ourselves "absolute latest"
214- if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
215- UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /julia-latest-${SHORT_OS}${SHORT_ARCH} " )
206+ # If we're on `master` and we're uploading, we consider ourselves "absolute latest"
207+ if [[ " ${BUILDKITE_BRANCH} " == " master" ]]; then
208+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${FOLDER_OS} /${FOLDER_ARCH} /julia-latest-${SHORT_OS}${SHORT_ARCH} " )
209+ fi
216210 fi
217211fi
218212
213+ # If we're a pull request build, upload to a special `-prXXXX` location
214+ if [[ " ${BUILDKITE_PULL_REQUEST} " != " false" ]]; then
215+ UPLOAD_TARGETS+=( " ${S3_BUCKET} /${S3_BUCKET_PREFIX} /${OS?} /${ARCH?} /julia-pr${BUILDKITE_PULL_REQUEST} -${OS?} -${ARCH?} " )
216+ fi
217+
219218# This is the "main" filename that is used. We technically don't need this for uploading,
220219# but it's very convenient for shuttling binaries between buildkite steps.
221220export UPLOAD_FILENAME=" julia-${TAR_VERSION?} -${OS?} -${ARCH?} "
0 commit comments