From f60d465ddea163057c36e85b2d586c40f437387f Mon Sep 17 00:00:00 2001 From: DanVanAtta Date: Mon, 2 Sep 2019 08:07:15 -0700 Subject: [PATCH] Push a tag so that releases are named under the tag name. --- .travis.yml | 1 + .travis/push_tag | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 .travis/push_tag diff --git a/.travis.yml b/.travis.yml index bf34ec9..65b4e88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ install: skip script: - ./.travis/run_optipng - ./.travis/zip_assets + - ./.travis/push_tag deploy: provider: releases api_key: "$BOT_AUTH_TOKEN" diff --git a/.travis/push_tag b/.travis/push_tag new file mode 100755 index 0000000..736fa72 --- /dev/null +++ b/.travis/push_tag @@ -0,0 +1,14 @@ +#!/bin/bash + +## Releases will be created under the latest tag pushed, or Travis +## will create a name for the tag automatically if there is none. +## The tag name is part of the download URL, naming and pushing a +## tag keeps the download URL predictable and easier to update. + +readonly REPO_URL="https://${BOT_AUTH_TOKEN}@github.com/triplea-game/assets.git" +git config --global user.email "tripleabuilderbot@gmail.com" +git config --global user.name "tripleabuilderbot" + +git tag "$TRAVIS_BUILD_NUMBER" -a -f -m "$TAG_VALUE" +git push -q "$REPO_URL" --tags +