From d917f5f7afb1ebb33a5569cb542d7a056148dde9 Mon Sep 17 00:00:00 2001 From: Darius Morawiec Date: Sun, 20 Jan 2019 01:38:36 +0100 Subject: [PATCH] release/0.7.0: Add rc check --- .scripts/run.deployment.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.scripts/run.deployment.sh b/.scripts/run.deployment.sh index 69188c7c..25a2f6ec 100755 --- a/.scripts/run.deployment.sh +++ b/.scripts/run.deployment.sh @@ -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