Commit 18f98b04 authored by echel0n's avatar echel0n
Browse files

Refactored CI script to update changelog in separate stage

parent 9e7bfb61
......@@ -3,6 +3,7 @@ stages:
# - review_docker
# - review_deploy
- release_build
- release_changelog
- release_sentry
- release_deploy
......@@ -121,10 +122,6 @@ release_build_master:
- git fetch . release-$(cat sickrage/version.txt):master
- git fetch . release-$(cat sickrage/version.txt):develop
- git tag -a $(cat sickrage/version.txt) -m "Release v$(cat sickrage/version.txt) master"
- npx auto-changelog --hide-credit --package --commit-limit false --ignore-commit-pattern \[TASK\].*
- git add CHANGELOG.md
- git commit --amend --no-edit
- git tag -f -a $(cat sickrage/version.txt) -m "Release v$(cat sickrage/version.txt) master"
- git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:master --follow-tags
- git checkout develop
- bumpversion --allow-dirty patch package.json sickrage/version.txt
......@@ -141,6 +138,7 @@ release_build_master:
- triggers
variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Releasing/
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Changelog/
release_build_develop:
stage: release_build
......@@ -166,10 +164,6 @@ release_build_develop:
- git add --all
- git commit -m "[TASK] Pre-Releasing v$(cat sickrage/version.txt)"
- git tag -a $(cat sickrage/version.txt) -m "Pre-release v$(cat sickrage/version.txt)"
- npx auto-changelog --hide-credit --unreleased --package --commit-limit false --ignore-commit-pattern \[TASK\].*
- git add CHANGELOG.md
- git commit --amend --no-edit
- git tag -f -a $(cat sickrage/version.txt) -m "Pre-release v$(cat sickrage/version.txt)"
- git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:$CI_COMMIT_REF_NAME --follow-tags
only:
- [email protected]/sickrage
......@@ -179,8 +173,26 @@ release_build_develop:
- triggers
variables:
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Pre-Releasing/
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Changelog/
- $CI_COMMIT_MESSAGE =~ /\[TASK\] Bump/
release_changelog:
stage: release_changelog
retry: 2
image: nikolaik/python-nodejs:python3.8-nodejs10-alpine
script:
- apk add --no-cache git
- npx auto-changelog --hide-credit --unreleased --package --commit-limit false --ignore-commit-pattern \[TASK\].*
- git add CHANGELOG.md
- git commit -m "[TASK] Changelog updated for v$(cat sickrage/version.txt)"
- git push https://$GIT_ACCESS_USER:[email protected]$CI_SERVER_HOST/$CI_PROJECT_PATH.git HEAD:$CI_COMMIT_REF_NAME
only:
- /^[0-9.]+$/@SiCKRAGE/sickrage
- /^[0-9.]+dev[0-9]+$/@SiCKRAGE/sickrage
except:
- branches
- triggers
release_sentry_master:
stage: release_sentry
retry: 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment