-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from IBM/release
Release when a new tag is pushed
- Loading branch information
Showing
4 changed files
with
45 additions
and
4 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
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
from mlflow_watsonml.deploy import WatsonMLDeploymentClient | ||
# THIS IS AN AUTOMATICALLY GENERATED FILE | ||
# DO NOT EDIT IT SINCE YOUR CHANGES WILL | ||
# BE LOST | ||
__version__ = '0.11.2' |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.11.1" | ||
__version__ = "0.11.4" |
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,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
VERSION=$1 | ||
ROOT="$( cd "$(dirname "$0")" ; pwd -P )" | ||
|
||
if [ -z $VERSION ]; then | ||
echo "usage: bash release <version>" | ||
exit | ||
fi | ||
|
||
git checkout mlflow_watsonml/__init__.py | ||
current_branch=$(git symbolic-ref --short HEAD 2>/dev/null) | ||
|
||
if [ "$current_branch" != "main" ]; then | ||
echo "Error: Branch must be 'main'. Current branch is '$current_branch'." | ||
exit 1 | ||
fi | ||
|
||
if ! git diff-index --quiet HEAD --; then echo "can't create release, you have uncommitted files"; exit; fi | ||
if git status --porcelain 2>/dev/null | egrep "^ M|??"; then echo "Can't create release, you have uncommitted or untracked files"; exit; fi | ||
|
||
# make sure this tag is in our setup.py | ||
if ! grep "__version__ = \"$VERSION\"" mlflow_watsonml/_version.py; then "$VERSION does not match that listed in mlflow_watsonml/_version.py"; exit ; fi | ||
|
||
echo creating mlflow_watsonml release $VERSION | ||
echo "# THIS IS AN AUTOMATICALLY GENERATED FILE" > mlflow_watsonml/__init__.py | ||
echo "# DO NOT EDIT IT SINCE YOUR CHANGES WILL" >> mlflow_watsonml/__init__.py | ||
echo "# BE LOST" >> mlflow_watsonml/__init__.py | ||
echo "__version__ = '$VERSION'" >> mlflow_watsonml/__init__.py | ||
|
||
git commit -m"release $VERSION" mlflow_watsonml/__init__.py | ||
|
||
cd $ROOT | ||
echo "creating tag and pushing" | ||
git tag -a $VERSION -m"new release" \ | ||
&& git push origin $VERSION \ | ||
&& git push |