Skip to content
Snippets Groups Projects
Commit bba47bfd authored by Philipp Stadler's avatar Philipp Stadler
Browse files

fix: avoid problem with non-zero exit code by moving that part into the if

parent 8fa86aa7
No related branches found
No related tags found
1 merge request!4Fix/ci exit code
Pipeline #9590 passed
...@@ -38,8 +38,7 @@ publish-package-json-version-as-git-tag: ...@@ -38,8 +38,7 @@ publish-package-json-version-as-git-tag:
- main - main
script: script:
- NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4) - NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4)
- MATCHING_GIT_TAG=$(git tag | grep ^${NPM_VERSION}$) - if [ -z $(git tag | grep ^${NPM_VERSION}$) ]; then
- if [ -z $MATCHING_GIT_TAG ]; then
- echo adding git tag for first commit on main with NPM version ${NPM_VERSION} - echo adding git tag for first commit on main with NPM version ${NPM_VERSION}
- git remote remove origin - git remote remove origin
- git remote add origin https://oauth:${REPOSITORY_ACCESS_TOKEN}@gitlab.phaidra.org/kartenaale/sinologie-anki-pack.git - git remote add origin https://oauth:${REPOSITORY_ACCESS_TOKEN}@gitlab.phaidra.org/kartenaale/sinologie-anki-pack.git
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment