Enable automatic tagging in the CI pipeline #patch

This commit is contained in:
Daniel_I_Am 2020-08-20 15:00:22 +02:00
parent 680d0419f6
commit cefbed217e
No known key found for this signature in database
GPG Key ID: FC83834B306E8F14

View File

@ -41,7 +41,14 @@ version:
- docker
- hawkeye
script:
- 'apk add git'
- 'apk add git grep npm'
- 'npm install -g semver'
- 'mkdir -p ~/.ssh/'
- 'echo $GITLAB_DEPLOY_KEY > ~/.ssh/id_rsa'
- 'chmod 600 ~/.ssh/id_rsa'
- 'ssh-keyscan -p 2302 git.chaoticlogic.us >> ~/.ssh/known_hosts'
- 'git tag $(semver -i $( (git log -1 --pretty=%B | grep -oP "(?<=#)(patch|minor|major)" || echo "patch") | head -1) $(git tag --list | sort -rV | head -1))'
- 'git push --tags'
- 'git describe --tags | tr -d "\n" > version'
artifacts:
paths: