diff --git a/deploy/chores/check_version b/deploy/chores/check_version index 817039d..8d150c0 100755 --- a/deploy/chores/check_version +++ b/deploy/chores/check_version @@ -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 )'!" diff --git a/deploy/chores/docker_buildx b/deploy/chores/docker_buildx index f5ade1a..0249229 100755 --- a/deploy/chores/docker_buildx +++ b/deploy/chores/docker_buildx @@ -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