forked from shakenfist/client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·44 lines (35 loc) · 845 Bytes
/
release.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
#!/bin/bash -e
# Release a specified version of Shaken Fist
echo "--- Determine verison number ---"
PREVIOUS=`git tag | egrep "^v" | sort -n | tail -1 | sed 's/^v//'`
echo
echo -n "What is the version number (previous was $PREVIOUS)? "
read VERSION
echo
echo "--- Setup ---"
set -x
pip install --upgrade readme-renderer
pip install --upgrade twine
rm -rf build dist *.egg-info
git pull || true
set +x
echo
echo "--- Setup ---"
echo "Do you want to apply a git tag for this release (yes to tag)?"
read TAG
set -x
if [ "%$TAG%" == "%yes%" ]
then
git tag -s "v$VERSION" -m "Release v$VERSION"
git push origin "v$VERSION"
fi
python3 setup.py sdist bdist_wheel
twine check dist/*
set +x
echo
echo "--- Uploading ---"
echo "This is the point where we push files to pypi. Hit ctrl-c to abort."
read DUMMY
set -x
twine upload dist/*
set +x