Skip to content

Commit ac7a99a

Browse files
Allow tag already exist when pushing a release
1 parent bdd1577 commit ac7a99a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hack/release.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ if [[ -z "${OS_TAG}" ]]; then
1818
fi
1919
tag="${OS_TAG}"
2020

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

2330
docker pull openshift/origin-base
2431
docker pull openshift/origin-release

0 commit comments

Comments
 (0)