Skip to content

Commit

Permalink
Push a git tag after a VERSION change
Browse files Browse the repository at this point in the history
Normally expeditor does a 'git tag' for us when we use
'built_in:bump_version' but in this case we are doing the version bump
on our own since sometimes we do a major/minor bump based on the the
date.

Signed-off-by: Bryan McLellan <btm@loftninjas.org>
  • Loading branch information
btm committed May 17, 2020
1 parent d362e47 commit f7e420e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ merge_actions:
- "Expeditor: Skip Omnibus"
- "Expeditor: Skip All"
only_if: bash:.expeditor/determine_version.sh
- bash:.expeditor/push-git-tag.sh:
only_if: bash:.expeditor/determine_version.sh
post_commit: true

pipelines:
- verify:
Expand Down
12 changes: 12 additions & 0 deletions .expeditor/push-git-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# This gets run as a post-commit hook after merge to add the version tag so it
# is easy to determine what changes are in a particular build.
#
# https://expeditor.chef.io/docs/reference/action-filters/#post-commit


VERSION=`cat VERSION`

git tag $VERSION
git push origin $VERSION

0 comments on commit f7e420e

Please sign in to comment.