Loading project-automation/semantic-release-badge.yml +10 −5 Original line number Diff line number Diff line Loading @@ -2,13 +2,18 @@ badge:semantic-release: extends: .badge before_script: # We can't do this in rules as this variable is created during the pipeline run. # If tbump did not create a new version, get the tag of the current commit - TAG_VERSION="${TBUMP_NEXT_VERSION:-$(git describe --tags --abbrev=0)}" - | if [ -z "${TBUMP_NEXT_VERSION}" ]; then echo "[!] No next version." if [ "${TAG_VERSION}" = "" ]; then echo "[!] No bumped version." exit 0 elif [ ! "${TAG_VERSION::1}" = "v" ]; then TAG_VERSION="v${TAG_VERSION}" fi variables: NAME: "version" VALUE: "v${TBUMP_NEXT_VERSION}" LABEL: "version" VALUE: "${TAG_VERSION}" COLOR: "green" URL: "${CI_PROJECT_URL}/tags/v${TBUMP_NEXT_VERSION}" URL: "${CI_PROJECT_URL}/tags/v${TAG_VERSION}" BADGE_NAME: "version" Loading
project-automation/semantic-release-badge.yml +10 −5 Original line number Diff line number Diff line Loading @@ -2,13 +2,18 @@ badge:semantic-release: extends: .badge before_script: # We can't do this in rules as this variable is created during the pipeline run. # If tbump did not create a new version, get the tag of the current commit - TAG_VERSION="${TBUMP_NEXT_VERSION:-$(git describe --tags --abbrev=0)}" - | if [ -z "${TBUMP_NEXT_VERSION}" ]; then echo "[!] No next version." if [ "${TAG_VERSION}" = "" ]; then echo "[!] No bumped version." exit 0 elif [ ! "${TAG_VERSION::1}" = "v" ]; then TAG_VERSION="v${TAG_VERSION}" fi variables: NAME: "version" VALUE: "v${TBUMP_NEXT_VERSION}" LABEL: "version" VALUE: "${TAG_VERSION}" COLOR: "green" URL: "${CI_PROJECT_URL}/tags/v${TBUMP_NEXT_VERSION}" URL: "${CI_PROJECT_URL}/tags/v${TAG_VERSION}" BADGE_NAME: "version"