run chores on master branch
This commit is contained in:
parent
0e0a7ab5a9
commit
1ab9e0cf24
2 changed files with 10 additions and 1 deletions
|
@ -7,6 +7,8 @@ script_dir="$( dirname "${script}" )"
|
||||||
&& git_status="developing"
|
&& git_status="developing"
|
||||||
git rev-parse --abbrev-ref HEAD | grep -E 'release|hotfix/' >/dev/null \
|
git rev-parse --abbrev-ref HEAD | grep -E 'release|hotfix/' >/dev/null \
|
||||||
&& git_status="releasing"
|
&& git_status="releasing"
|
||||||
|
git rev-parse --abbrev-ref HEAD | grep -E 'master' >/dev/null \
|
||||||
|
&& git_status="released"
|
||||||
|
|
||||||
|
|
||||||
if [ "${git_status}" = "developing" ]; then
|
if [ "${git_status}" = "developing" ]; then
|
||||||
|
@ -23,6 +25,13 @@ elif [ "${git_status}" = "releasing" ]; then
|
||||||
git rev-parse --abbrev-ref HEAD \
|
git rev-parse --abbrev-ref HEAD \
|
||||||
| cut -d '/' -f 2
|
| 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
|
else
|
||||||
echo "ERROR: Invalid git branch"
|
echo "ERROR: Invalid git branch"
|
||||||
echo "ERROR: Chores cannot be run on '$( git rev-parse --abbrev-ref HEAD )'!"
|
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
|
# vars defined in `check_version` script
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [ "${git_status}" = "releasing" ]; then
|
if [ "${git_status}" = "releasing" ] || [ "${git_status}" = "released" ]; then
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
image_tag="${git_version}"
|
image_tag="${git_version}"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue