From 6a6da7ca58745f015c3b0e03117993c41648cac8 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 31 Aug 2017 19:27:23 +0200 Subject: [PATCH] Modify the deployment script a bit more. --- deploy.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index 8529a85..7e18f29 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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