Skip to content

Commit

Permalink
Allow tag already exist when pushing a release
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Nov 13, 2015
1 parent bdd1577 commit ac7a99a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ if [[ -z "${OS_TAG}" ]]; then
fi
tag="${OS_TAG}"

git tag "${tag}" -a -m "${tag}" HEAD
if [[ "$(git name-rev --name-only --tags HEAD)" != "${tag}^0" ]]; then
if git rev-parse -q --short "${tag}" &>/dev/null; then
echo "Tag ${tag} already exists"
exit 1
else
git tag "${tag}" -a -m "${tag}" HEAD
fi
fi

docker pull openshift/origin-base
docker pull openshift/origin-release
Expand Down

0 comments on commit ac7a99a

Please sign in to comment.