-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ac5dbb
commit 5004bfa
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |