11#! /usr/bin/env bash
22
33# First, extract information from our triplet
4+ # shellcheck source=SCRIPTDIR/extract_triplet.sh
45source .buildkite/utilities/extract_triplet.sh
56
67# Figure out what GNU Make is on this system
@@ -14,7 +15,8 @@ export MAKE
1415# Apply fixups to our environment for when we're running on julia-buildkite pipeline
1516if buildkite-agent meta-data exists BUILDKITE_JULIA_BRANCH; then
1617 # `BUILDKITE_BRANCH` should refer to `julia.git`, not `julia-buildkite.git`
17- export BUILDKITE_BRANCH=$( buildkite-agent meta-data get BUILDKITE_JULIA_BRANCH)
18+ BUILDKITE_BRANCH=$( buildkite-agent meta-data get BUILDKITE_JULIA_BRANCH)
19+ export BUILDKITE_BRANCH
1820fi
1921
2022# Determine JULIA_CPU_TARGETS for different architectures
@@ -108,13 +110,16 @@ export JULIA_IMAGE_THREADS="$JULIA_CPU_THREADS"
108110
109111# Extract git information
110112SHORT_COMMIT_LENGTH=10
111- export LONG_COMMIT=" $( git rev-parse HEAD) "
112- export SHORT_COMMIT=" $( echo ${LONG_COMMIT} | cut -c1-${SHORT_COMMIT_LENGTH} ) "
113+ LONG_COMMIT=" $( git rev-parse HEAD) "
114+ SHORT_COMMIT=" $( echo " ${LONG_COMMIT} " | cut -c1-${SHORT_COMMIT_LENGTH} ) "
115+ export LONG_COMMIT SHORT_COMMIT
113116
114117# Extract information about the current julia version number
115- export JULIA_VERSION=" $( cat VERSION) "
116- export MAJMIN=" $( cut -d. -f1-2 <<< " ${JULIA_VERSION}" ) "
117- export MAJMINPAT=" $( cut -d- -f1 <<< " ${JULIA_VERSION}" ) "
118+ JULIA_VERSION=" $( cat VERSION) "
119+ MAJMIN=" $( cut -d. -f1-2 <<< " ${JULIA_VERSION}" ) "
120+ MAJMINPAT=" $( cut -d- -f1 <<< " ${JULIA_VERSION}" ) "
121+ export JULIA_VERSION MAJMIN MAJMINPAT
122+
118123# If we're on a tag, then our "tar version" will be the julia version.
119124# Otherwise, it's the short commit.
120125if git describe --tags --exact-match > /dev/null 2> /dev/null; then
@@ -128,7 +133,8 @@ export TAR_VERSION
128133# Build the filename that we'll upload as, and get the filename that will be built
129134# These are not the same in situations such as `musl`, where the build system doesn't
130135# differentiate but we need to give it a different name.
131- export JULIA_BINARYDIST_FILENAME=" $( ${MAKE} print-JULIA_BINARYDIST_FILENAME | cut -c27- | tr -s ' ' ) "
136+ JULIA_BINARYDIST_FILENAME=" $( ${MAKE} print-JULIA_BINARYDIST_FILENAME | cut -c27- | tr -s ' ' ) "
137+ export JULIA_BINARYDIST_FILENAME
132138
133139export JULIA_INSTALL_DIR=" julia-${TAR_VERSION} "
134140JULIA_BINARY=" ${JULIA_INSTALL_DIR} /bin/julia${EXE} "
@@ -227,6 +233,6 @@ echo "Detected Julia version: ${MAJMIN} (${JULIA_VERSION})"
227233echo " Detected build platform: ${TRIPLET} (${ARCH} , ${OS} )"
228234echo " Julia will be uploaded to: s3://${UPLOAD_TARGETS[0]} .tar.gz"
229235echo " With additional upload targets:"
230- for UPLOAD_TARGET in ${UPLOAD_TARGETS[@]: 1} ; do
236+ for UPLOAD_TARGET in " ${UPLOAD_TARGETS[@]: 1} " ; do
231237 echo " -> s3://${UPLOAD_TARGET} .tar.gz"
232238done
0 commit comments