Skip to content

Commit

Permalink
Merge branch 'branch-22.12' into patch-58
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar authored Oct 10, 2022
2 parents 6df6fd5 + 04f0628 commit 99ea5a7
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
## Usage
# bash update-version.sh <new_version>

# Workaround for MacOS where BSD sed doesn't support the flags
# Install MacOS gsed with `brew install gnu-sed`
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) sedCmd=sed;;
Darwin*) sedCmd=gsed;;
*) echo "Unknown OS"; exit 1;;
esac


# Format is YY.MM.PP - no leading 'v' or trailing 'a'
NEXT_FULL_TAG=$1
Expand All @@ -26,12 +35,14 @@ echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

# Inplace sed replace; workaround for Linux and Mac
function sed_runner() {
sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak
$sedCmd -i.bak ''"$1"'' $2 && rm -f ${2}.bak
}

# Axis file update
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly-arm64.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- \"${NEXT_FULL_TAG}\"/}" ci/axis/release.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- \"${NEXT_FULL_TAG}\"/}" ci/axis/release-arm64.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly-env-arm64.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly-env.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly-meta-arm64.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}a/}" ci/axis/nightly-meta.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}/}" ci/axis/release-arm64.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- ${NEXT_FULL_TAG}/}" ci/axis/release.yaml
sed_runner "/RAPIDS_VER/{n; s/- .*/- \"${NEXT_SHORT_TAG}\"/}" ci/axis/tests.yaml

0 comments on commit 99ea5a7

Please sign in to comment.