From f876d0aa2d39fb30d81033723df3e60b0c797325 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Sun, 17 May 2020 15:47:58 -0400 Subject: [PATCH] Push a git tag after a VERSION change 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 --- .expeditor/config.yml | 3 +++ .expeditor/push-git-tag.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 .expeditor/push-git-tag.sh diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 06e30018f..46ab6f73f 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -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: diff --git a/.expeditor/push-git-tag.sh b/.expeditor/push-git-tag.sh new file mode 100755 index 000000000..a9d6b40fc --- /dev/null +++ b/.expeditor/push-git-tag.sh @@ -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