Skip to content

Commit

Permalink
version bump sh
Browse files Browse the repository at this point in the history
  • Loading branch information
joshreini1 committed Feb 23, 2024
1 parent 9ac5dbb commit 5004bfa
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions trulens_eval/trulens_eval/version_bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Function to bump the version
bump_version() {
local major=$1
local minor=$2
local patch=$3

# Determine OS and prepare SED in-place extension accordingly
local SED_EXT="-i"
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS requires an empty string argument after -i
SED_EXT="-i ''"
else
SED_EXT="-i"
fi

# Replace the version tuple in __init__.py
eval "sed $SED_EXT 's/__version_info__ = .*/__version_info__ = ($major, $minor, $patch)/' trulens_eval/__init__.py"
}

# Bump the version with the provided arguments
bump_version $1 $2 $3

0 comments on commit 5004bfa

Please sign in to comment.