Skip to content

Commit

Permalink
release/0.7.0: Add rc check
Browse files Browse the repository at this point in the history
  • Loading branch information
nok committed Jan 20, 2019
1 parent b31384f commit d917f5f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .scripts/run.deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,17 @@ source activate $ANACONDA_ENV
VERSION=`python -c "from sklearn_porter import __version__ as ver; print(ver);"`
COMMIT=`git rev-parse --short HEAD`

TARGET=""

# Environment:
read -r -p "Build $NAME for production (pypi.org)? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
TARGET="https://upload.pypi.org/legacy/"
else
TARGET="https://upload.pypi.org/legacy/"
if [[ $VERSION == *"rc"* ]]; then
TARGET="https://test.pypi.org/legacy/"
VERSION="rc$VERSION-$COMMIT"
fi

# Build the package:
python ./setup.py sdist bdist_wheel

# Upload the package:
read -r -p "Upload $NAME@$VERSION to '$TARGET'? [y/N] " response
read -r -p "Upload $NAME@$VERSION (#$COMMIT) to '$TARGET'? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
twine upload ./dist/* --repository-url $TARGET
fi

0 comments on commit d917f5f

Please sign in to comment.