Skip to content

Commit 98102bd

Browse files
committed
update make_release.sh
1 parent c5639f1 commit 98102bd

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

make_release.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
#!/usr/bin/env bash
2-
set -eux
32

4-
# Ensure that there are no uncommitted changes
5-
# which would mess up using the git tag as a version
6-
[ -z "$(git status --porcelain)" ]
3+
set -eux -o pipefail
74

8-
if [ -z "${1+x}" ]
9-
then
5+
if [ ! -z "$(git status --porcelain)" ]; then
6+
set +x
7+
echo You have uncommitted changes which would mess up the git tag
8+
exit 1
9+
fi
10+
11+
if [ -z "${1+x}" ]; then
1012
set +x
1113
echo Provide a version argument
1214
echo "${0} <major>.<minor>.<patch>"
1315
exit 1
14-
else
15-
if [[ ${1} =~ ^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?$ ]]; then
16-
:
17-
else
18-
echo "Not a valid release tag."
19-
exit 1
20-
fi
2116
fi
2217

23-
tox -p auto
18+
if [[ ! ${1} =~ ^([0-9]+)(\.[0-9]+)?(\.[0-9]+)?$ ]]; then
19+
echo "Not a valid release tag."
20+
exit 1
21+
fi
22+
23+
tox -p 3
2424

2525
export TAG="v${1}"
2626
git tag "${TAG}"
27-
git push origin master "${TAG}"
27+
git push origin HEAD "${TAG}"
2828
rm -rf ./build ./dist
2929
python -m build --sdist --wheel .
3030
twine upload ./dist/*.whl dist/*.tar.gz

0 commit comments

Comments
 (0)