I'm trying to auto-bump npm project's version via GitLab. This is my gitlab CI:
stages:
- release
variables:
project_name: yagelProjectTest
SEMANTIC_RELEASE_PACKAGE: ${project_name}
CI_REPOSITORY_URL: https://release-user:glpat-xxxxxxxxx@gitlab.com/pro/ject/blalba.git
release:
image: node:latest
stage: release
script:
- export PUSH_REPO=$(echo "$CI_REPOSITORY_URL" | sed -e "s|.*@\(.*\)|git@\1|" -e "s|/|:/|" )
# increment PATCH, for instance
- git config --global user.email "yagel@aaaaa.com"
- git config --global user.name "yagel"
- git branch
- git checkout "${CI_COMMIT_BRANCH}"
- echo "${CI_COMMIT_BRANCH}"
- git branch
- npm version minor
- git remote add origin-ci "${PUSH_REPO}"
- git pull
- git add .
- git commit -m "auto-increment"
- git push origin-ci "${CI_COMMIT_BRANCH}"
This is the error I'm getting:
$ npm version minor
v0.1.0
$ git remote add origin-ci "${PUSH_REPO}"
$ git pull
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.
$ git add .
$ git commit -m "auto-increment"
On branch yagel-auto-bump
Your branch is ahead of 'origin/yagel-auto-bump' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1
Any idea why I'm getting this error?