Skip to content

Commit

Permalink
Add update-version.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Jan 16, 2024
1 parent 6c3768b commit e9ecf96
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.

## Usage
# bash update-version.sh <new_version>


# Format is MAJOR.MINOR.PATCH - no leading 'v' or trailing 'a'
NEXT_FULL_TAG=$1

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
}

# Centralized version file update
echo "${NEXT_FULL_TAG}" > pynvjitlink/VERSION
sed_runner 's/'"^ VERSION [0-9\.]*"'/'" VERSION ${NEXT_FULL_TAG}"'/g' CMakeLists.txt
sed_runner 's/^version = "[0-9\.]*"/version = "'${NEXT_FULL_TAG}'"/g' pyproject.toml

0 comments on commit e9ecf96

Please sign in to comment.