diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..a9d23fc --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,25 @@ +#! /bin/bash +# +# deploy.sh +# Copyright (C) Appknox +# +# Distributed under terms of the Apache 2.0 license. +# + + +rm -rf dist/ +if [ "$1" != '' ]; then + poetry version $1 +else + poetry version patch +fi +version=$(poetry version | awk '{print $2}') +tag="v${version}" +echo $tag +export CURRENT_BRANCH +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +git tag $tag +git push --tags +git push origin "$CURRENT_BRANCH:$CURRENT_BRANCH" +poetry build +poetry publish \ No newline at end of file