Kaydet (Commit) 87d72c0f authored tarafından Joffrey F's avatar Joffrey F

Misc release script improvements

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 205a2f76
......@@ -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
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment