Skip to content

Commit aa07329

Browse files
simonlordprydie
authored andcommitted
Check a version hasn't been pushed/released already during Wercker build (#194)
Fixes #154
1 parent 9ca8667 commit aa07329

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

wercker.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ push:
5959
export VERSION=$(cat VERSION.txt)
6060
echo "${VERSION}"
6161
62+
- script:
63+
name: Ensure version is unique
64+
code: |
65+
if curl -s https://api.github.com/repos/oracle/oci-cloud-controller-manager/git/refs/tags | grep "tags/$VERSION"; then
66+
echo "Tag $VERSION already exists. Doing nothing."
67+
exit 1
68+
fi
69+
6270
- script:
6371
name: prepare
6472
code: |
@@ -81,6 +89,14 @@ release:
8189
export VERSION=$(cat VERSION.txt)
8290
echo "${VERSION}"
8391
92+
- script:
93+
name: Ensure version is unique
94+
code: |
95+
if curl -s https://api.github.com/repos/oracle/oci-cloud-controller-manager/git/refs/tags | grep "tags/$VERSION"; then
96+
echo "Tag $VERSION already exists. Doing nothing."
97+
exit 1
98+
fi
99+
84100
- github-create-release:
85101
token: $GITHUB_TOKEN
86102
tag: $VERSION

0 commit comments

Comments
 (0)