Skip to content

Commit 54c6324

Browse files
authored
Delete release tag if it already exists during a release (make release-to-github.yml safe to re-run). (aws#2717)
1 parent ab10c0b commit 54c6324

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

buildspecs/release-to-github.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ phases:
2121
- RELEASE_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
2222
-
2323
- git remote add --fetch public $PUBLIC_REPOSITORY_URL
24+
- |
25+
if git show-ref --tags $RELEASE_VERSION --quiet; then
26+
git push -d public :refs/tags/$RELEASE_VERSION
27+
fi
2428
- git tag -a $RELEASE_VERSION -m "AWS SDK for Java v2 ($RELEASE_VERSION)"
2529
-
2630
- git push public HEAD:release

0 commit comments

Comments
 (0)