diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8729e64bdffedeaf12b61efd4c0f4034f83b8037..b4a87559ae028ad4c6ea92ee98cb5e7d813dd91c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,8 +43,13 @@ release-package-json-version-as-git-tag: resource_group: repository script: - NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4) + # debug + - git tag | grep ^${NPM_VERSION}$ || exit_code=$? # || exit_code=$? is the recommended way to ignore a non-zero exit code - NPM_VERSION_GIT_TAG=$(git tag | grep ^${NPM_VERSION}$ || exit_code=$?) + - echo $NPM_VERSION + - echo $NPM_VERSION_GIT_TAG + - echo $ - if [ -z "$NPM_VERSION_GIT_TAG" ]; then - echo adding git tag for first commit on main with NPM version ${NPM_VERSION} - git remote remove origin