-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.sh
44 lines (40 loc) · 865 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# https://python-poetry.org/docs/cli/#version
# Tag the version
if [ -z "$1" ]
then
echo "Deploy failed"
elif [ "$1" = "patch" ]
then
poetry version patch
elif [ "$1" = "minor" ]
then
poetry version minor
elif [ "$1" = "major" ]
then
poetry version major
elif [ "$1" = "premajor" ]
then
poetry version premajor
elif [ "$1" = "preminor" ]
then
poetry version preminor
elif [ "$1" = "prepatch" ]
then
poetry version prepatch
elif [ "$1" = "prerelease" ]
then
poetry version prerelease
else
echo "Deploy failed."
fi
# Tag
VERSION=`poetry version`
VERSION_BITS=(${VERSION// })
NEW_TAG=${VERSION_BITS[1]}
# commit the changes
git add -A
git commit -m "Pushing a new release candidate"
git push
git tag $NEW_TAG
git push --tags
echo "Tagged and pushed to GitHub"