From fd3cf574cf78aea0354a2e911e3077b8f7e96f17 Mon Sep 17 00:00:00 2001 From: Dmitry Panin Date: Thu, 12 Dec 2013 21:08:39 +0400 Subject: [PATCH] Remove previous tag "latest-master" before uploading new one --- upload-binaries.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/upload-binaries.sh b/upload-binaries.sh index 858d1acfa..e01376b31 100755 --- a/upload-binaries.sh +++ b/upload-binaries.sh @@ -49,6 +49,11 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then curl -X DELETE -H "Authorization: token ${GH_TOKEN}" \ "https://api.github.com/repos/WagicProject/wagic/releases/${ID_TO_DELETE}" + # delete previous tag + curl -X DELETE -H "Authorization: token ${GH_TOKEN}" \ + "https://api.github.com/repos/WagicProject/wagic/git/refs/tags/latest-master" + + echo -e "Creating a release\n" curl -X POST -H "Authorization: token ${GH_TOKEN}" \ -d '{"tag_name": "latest-master", "target_commitish": "master", "name": "master-'${TRAVIS_BUILD_NUMBER}'", "body": "Automatic release based on latest commit to master branch generated by Travis CI", "draft": false, "prerelease": true}' "https://api.github.com/repos/WagicProject/wagic/releases" > json.txt