mirror of
https://github.com/prometheus-community/ansible
synced 2025-02-16 12:48:26 +00:00
Merge pull request #40 from gardar/ci/cleanup-circleci
This commit is contained in:
commit
d92cdcd0ba
1 changed files with 0 additions and 25 deletions
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Description: Generate the next release version
|
||||
|
||||
set -uo pipefail
|
||||
|
||||
latest_tag="$(git semver)"
|
||||
if [[ -z "${latest_tag}" ]]; then
|
||||
echo "ERROR: Couldn't get latest tag from git semver, try 'pip install git-semver'" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use HEAD if CIRCLE_SHA1 is not set.
|
||||
now="${CIRCLE_SHA1:-HEAD}"
|
||||
|
||||
new_tag='none'
|
||||
git_log="$(git log --format=%B "${latest_tag}..${now}")"
|
||||
|
||||
case "${git_log}" in
|
||||
*"[major]"*|*"[breaking change]"* ) new_tag=$(git semver --next-major) ;;
|
||||
*"[minor]"*|*"[feat]"*|*"[feature]"* ) new_tag=$(git semver --next-minor) ;;
|
||||
*"[patch]"*|*"[fix]"*|*"[bugfix]"* ) new_tag=$(git semver --next-patch) ;;
|
||||
esac
|
||||
|
||||
echo "NEW_TAG=${new_tag}"
|
Loading…
Add table
Reference in a new issue