Merge branch 'develop' into hotfix/0.2.1
This commit is contained in:
commit
5bedc44837
2 changed files with 10 additions and 1 deletions
|
@ -7,6 +7,8 @@ script_dir="$( dirname "${script}" )"
|
|||
&& git_status="developing"
|
||||
git rev-parse --abbrev-ref HEAD | grep -E 'release|hotfix/' >/dev/null \
|
||||
&& git_status="releasing"
|
||||
git rev-parse --abbrev-ref HEAD | grep -E 'master' >/dev/null \
|
||||
&& git_status="released"
|
||||
|
||||
|
||||
if [ "${git_status}" = "developing" ]; then
|
||||
|
@ -23,6 +25,13 @@ elif [ "${git_status}" = "releasing" ]; then
|
|||
git rev-parse --abbrev-ref HEAD \
|
||||
| cut -d '/' -f 2
|
||||
)"
|
||||
elif [ "${git_status}" = "released" ]; then
|
||||
echo "Status: Released"
|
||||
# => version from current tag
|
||||
git_version="$( \
|
||||
git describe --tags \
|
||||
| sed -E 's/^v[^0-9]*((0|[1-9][0-9]*)[0-9\.]*[0-9])$/\1/'
|
||||
)"
|
||||
else
|
||||
echo "ERROR: Invalid git branch"
|
||||
echo "ERROR: Chores cannot be run on '$( git rev-parse --abbrev-ref HEAD )'!"
|
||||
|
|
|
@ -8,7 +8,7 @@ script_dir="$( dirname "${script}" )"
|
|||
|
||||
# vars defined in `check_version` script
|
||||
# shellcheck disable=SC2154
|
||||
if [ "${git_status}" = "releasing" ]; then
|
||||
if [ "${git_status}" = "releasing" ] || [ "${git_status}" = "released" ]; then
|
||||
# shellcheck disable=SC2154
|
||||
image_tag="${git_version}"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue