Skip to content

Commit

Permalink
try and trigger on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Davis committed Jul 21, 2017
1 parent 93339a3 commit 454a3fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: 2
jobs:
build:
trigger_tag:
tag: /.*/
working_directory: /go/src/github.com/monax/hoard
docker:
- image: silasdavis/hoard:build
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ if [[ $1 ]]; then
# Override mode, try to release this tag
export tag=$1
else
echo "Getting tag from HEAD which is $(git rev-parse HEAD)"
export tag=$(git tag --points-at HEAD)
# Only release from master unless being run as override
if [[ $(git symbolic-ref HEAD) != "refs/heads/master" ]]; then
echo "Branch is not master so not releasing."
exit 0
fi

fi

if [[ ! ${tag} ]]; then
Expand Down
13 changes: 8 additions & 5 deletions scripts/tag_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ set -e

# Don't tag if there is a dirty working dir
if ! git diff-index --quiet HEAD ; then
echo "There are uncommitted changes in the working directory."
echo "Warning there appears to be uncommitted changes in the working directory:"
git diff-index HEAD
echo
echo "Please commit them or stash them before tagging a release."
exit 1
fi

echo "This command will create a tag based on the latest release defined"
echo "programmatically in ./release/release.go. It will then push that version tag."
echo "In order to release merge the tagged commit to master."
echo "This command will tag the current commit $(git rev-parse --short HEAD)"
echo "based on the latest version/release info defined programmatically in"
echo "./release/release.go. It will then push the version tag."
echo "In order for this tag to be released the commit must already be merged"
echo "to master."
echo
read -p "Do you want to continue? [Y\n]: " -r
# Just hitting return defaults to continuing
Expand Down

0 comments on commit 454a3fb

Please sign in to comment.