forked from pyusb/pyusb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·44 lines (32 loc) · 886 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
#!/bin/bash -e
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
if ! which twine >/dev/null; then
echo "Aborting: please install twine'"
exit 1
fi
if [ $# -ne 1 ]; then
echo "Aborting: missing version tag"
echo "Usage: deploy.sh <version>"
exit 1
fi
version=$1
read -p "Deploying version $version; do you want to continue (yN)? " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
./gencl.sh
git tag -s -m "Version $version" v$version
python setup.py sdist bdist_wheel
gpg --detach-sign -a dist/pyusb-$version.tar.gz
gpg --detach-sign -a dist/pyusb-$version-py3-none-any.whl
read -p "Sdist and wheel ready; do you want to push the tag and upload the sdist and wheel (yN)? " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
git push
git push --tags
twine upload -s dist/pyusb-$version.tar.gz{,.asc} dist/pyusb-$version-py3-none-any.whl{,.asc}
rm -rf build/