Skip to content
Permalink
Browse files

Release version should follow semantic versioning format (#258)

* update

* Update release.sh

* fix exit type
  • Loading branch information...
parano committed Aug 7, 2019
1 parent 540a38d commit d652794af8cf46e096bd035abe4d9fdd7776adbe
Showing with 11 additions and 2 deletions.
  1. +11 −2 scripts/release.sh
@@ -5,7 +5,16 @@ if [ "$#" -eq 1 ]; then
VERSION_STR=$1
else
echo "Must provide release version string, e.g. ./script/release.sh 1.0.5"
exit 0
exit 1
fi

SEMVER_REGEX="^[vV]?(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$"

if [[ "$VERSION_STR" =~ $SEMVER_REGEX ]]; then
echo "Releasing bentoml version v$VERSION_STR:"
else
echo "Version $VERSION_STR must follow semantic versioning schema"
exit 1
fi

GIT_ROOT=$(git rev-parse --show-toplevel)
@@ -17,7 +26,7 @@ if [ ! -f $HOME/.pypirc ]; then
# about .pypirc file:
# https://docs.python.org/3/distutils/packageindex.html#the-pypirc-file
echo "Error: File \$HOME/.pypirc not found."
exit
exit 1
fi


0 comments on commit d652794

Please sign in to comment.
You can’t perform that action at this time.