Modify the deployment script a bit more.

This commit is contained in:
Dave Halter
2017-08-31 19:27:23 +02:00
parent 676828fd4f
commit 6a6da7ca58

View File

@@ -4,14 +4,23 @@
set -eu -o pipefail
cd CORRECT_FOLDER
BASE_DIR=$(dirname $(readlink -f "$0"))
cd $(BASE_DIR)
PROJECT_NAME=parso
PROJECT=git-clone
BRANCH=master
FOLDER=build/$PROJECT
BUILD_FOLDER=build
FOLDER=$BUILD_FOLDER/$PROJECT_NAME
cd $FOLDER
# Test first.
#tox
[ -d $BUILD_FOLDER ] || mkdir $BUILD_FOLDER
# Remove the previous deployment first.
rm -rf $FOLDER
# Checkout the right branch
cd $BUILD_FOLDER
git clone .. $PROJECT_NAME
git checkout $BRANCH
# Create tag
@@ -34,3 +43,7 @@ rm -rf dist/
python setup.py sdist bdist_wheel
# Maybe do a pip install twine before.
twine upload dist/*
cd $(BASE_DIR)
# Back in the development directory fetch tags.
git fetch --tags