mirror of https://github.com/docker/docker-py.git
Misc release script improvements
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
205a2f76bd
commit
87d72c0f6c
|
@ -22,7 +22,15 @@ echo "##> Removing stale build files"
|
|||
rm -rf ./build || exit 1
|
||||
|
||||
echo "##> Tagging the release as $VERSION"
|
||||
git tag $VERSION || exit 1
|
||||
git tag $VERSION
|
||||
if [[ $? != 0 ]]; then
|
||||
head_commit=$(git show --pretty=format:%H HEAD)
|
||||
tag_commit=$(git show --pretty=format:%H $VERSION)
|
||||
if [[ $head_commit != $tag_commit ]]; then
|
||||
echo "ERROR: tag already exists, but isn't the current HEAD"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ $2 == 'upload' ]]; then
|
||||
echo "##> Pushing tag to github"
|
||||
git push $GITHUB_REPO $VERSION || exit 1
|
||||
|
@ -30,10 +38,10 @@ fi
|
|||
|
||||
|
||||
pandoc -f markdown -t rst README.md -o README.rst || exit 1
|
||||
echo "##> sdist & wheel"
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
if [[ $2 == 'upload' ]]; then
|
||||
echo "##> Uploading sdist to pypi"
|
||||
python setup.py sdist bdist_wheel upload
|
||||
else
|
||||
echo "##> sdist & wheel"
|
||||
python setup.py sdist bdist_wheel
|
||||
fi
|
||||
echo '##> Uploading sdist to pypi'
|
||||
twine upload dist/docker-$VERSION*
|
||||
fi
|
Loading…
Reference in New Issue