Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
Check a version hasn't been pushed/released already during Wercker bu…
Browse files Browse the repository at this point in the history
…ild (#102)

Fixes #69
  • Loading branch information
simonlord authored and prydie committed Apr 30, 2018
1 parent d5af3d2 commit 31d24db
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ push:
export VERSION=$(cat VERSION.txt)
echo "${VERSION}"
- script:
name: Ensure version is unique
code: |
if curl -s https://api.github.com/repos/oracle/oci-flexvolume-driver/git/refs/tags | grep "tags/$VERSION"; then
echo "Tag $VERSION already exists. Doing nothing."
exit 1
fi
- script:
name: prepare
code: |
Expand All @@ -124,6 +132,14 @@ release:
export VERSION=$(cat VERSION.txt)
echo "${VERSION}"
- script:
name: Ensure version is unique
code: |
if curl -s https://api.github.com/repos/oracle/oci-flexvolume-driver/git/refs/tags | grep "tags/$VERSION"; then
echo "Tag $VERSION already exists. Doing nothing."
exit 1
fi
- github-create-release:
token: $GITHUB_TOKEN
tag: $VERSION
Expand Down

0 comments on commit 31d24db

Please sign in to comment.