Commit 98102bd 1 parent c5639f1 commit 98102bd Copy full SHA for 98102bd
File tree 1 file changed +15
-15
lines changed
1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- set -eux
3
2
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
7
4
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
10
12
set +x
11
13
echo Provide a version argument
12
14
echo " ${0} <major>.<minor>.<patch>"
13
15
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
21
16
fi
22
17
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
24
24
25
25
export TAG=" v${1} "
26
26
git tag " ${TAG} "
27
- git push origin master " ${TAG} "
27
+ git push origin HEAD " ${TAG} "
28
28
rm -rf ./build ./dist
29
29
python -m build --sdist --wheel .
30
30
twine upload ./dist/* .whl dist/* .tar.gz
You can’t perform that action at this time.
0 commit comments