File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,26 @@ echo "##> Removing stale build files"
22
22
rm -rf ./build || exit 1
23
23
24
24
echo " ##> Tagging the release as $VERSION "
25
- git tag $VERSION || exit 1
25
+ git tag $VERSION
26
+ if [[ $? != 0 ]]; then
27
+ head_commit=$( git show --pretty=format:%H HEAD)
28
+ tag_commit=$( git show --pretty=format:%H $VERSION )
29
+ if [[ $head_commit != $tag_commit ]]; then
30
+ echo " ERROR: tag already exists, but isn't the current HEAD"
31
+ exit 1
32
+ fi
33
+ fi
26
34
if [[ $2 == ' upload' ]]; then
27
35
echo " ##> Pushing tag to github"
28
36
git push $GITHUB_REPO $VERSION || exit 1
29
37
fi
30
38
31
39
32
40
pandoc -f markdown -t rst README.md -o README.rst || exit 1
41
+ echo " ##> sdist & wheel"
42
+ python setup.py sdist bdist_wheel
43
+
33
44
if [[ $2 == ' upload' ]]; then
34
- echo " ##> Uploading sdist to pypi"
35
- python setup.py sdist bdist_wheel upload
36
- else
37
- echo " ##> sdist & wheel"
38
- python setup.py sdist bdist_wheel
39
- fi
45
+ echo ' ##> Uploading sdist to pypi'
46
+ twine upload dist/docker-$VERSION *
47
+ fi
You can’t perform that action at this time.
0 commit comments