diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index aa7bfe8c..7892aec0 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -8,16 +8,6 @@ ## Usage # bash update-version.sh -# 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 @@ -28,7 +18,7 @@ CURRENT_MINOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}') CURRENT_PATCH=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}' | tr -d 'a') CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR} -#Get . for next version +# Get . for next version NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}') NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}') NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR} @@ -37,7 +27,7 @@ echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG" # Inplace sed replace; workaround for Linux and Mac function sed_runner() { - $sedCmd -i.bak ''"$1"'' $2 && rm -f ${2}.bak + sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak } sed_runner "/RAPIDS_VER=/ s/[0-9][0-9].[0-9][0-9]/${NEXT_SHORT_TAG}/" ci/conda-pack.sh