Skip to content

Commit

Permalink
Merge pull request #721 from buildkite/use-ls-remote-for-tag-detection
Browse files Browse the repository at this point in the history
Release process previously checked local tags, now remote
  • Loading branch information
lox committed Apr 4, 2018
2 parents 163c87c + 90a2c8e commit 204d868
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/upload-release-steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ build_version=$(buildkite-agent meta-data get "agent-version-build")
full_agent_version=$(buildkite-agent meta-data get "agent-version-full")
agent_docker_image_alpine=$(buildkite-agent meta-data get "agent-docker-image-alpine")

git fetch --tags

# If there is already a release (which means a tag), we want to avoid trying to create
# another one, as this will fail and cause partial broken releases
if git rev-parse -q --verify "refs/tags/v${agent_version}" >/dev/null; then
if git ls-remote --tags origin | grep "refs/tags/v${agent_version}" ; then
echo "Tag refs/tags/v${agent_version} already exists"
exit 0
fi
Expand Down

0 comments on commit 204d868

Please sign in to comment.