fix: pipeline script fixed

feat: auto version update

chore: auto update version [skip ci]

fix: auto version update

fix: auto version update

fix: auto version update
pull/1/head
Richard Attermeyer 2023-11-09 08:23:00 +01:00
parent 42969a5597
commit 06880e76d4
4 changed files with 10 additions and 3 deletions

View File

@ -23,7 +23,8 @@ steps:
image: node:lts-slim
commands:
- npm install --save-dev conventional-changelog-conventionalcommits @commitlint/config-conventional commitlint@latest
- npx commitlint --from HEAD~1 --to HEAD --verbose
- "echo message: $CI_COMMIT_MESSAGE"
- "echo $CI_COMMIT_MESSAGE | npx commitlint"
when:
- branch: [main, dev]
event: push

View File

@ -17,7 +17,8 @@ steps:
- git remote set-url origin "https://$CI_COMMIT_AUTHOR:$GIT_PAT@$(echo $CI_REPO_CLONE_URL | cut -b9-)"
- "git config --global user.name $CI_COMMIT_AUTHOR"
- "git config --global user.email $CI_COMMIT_AUTHOR_EMAIL"
- "git commit -am \"chore: auto update version [skip ci]\""
- "if ! git diff --exit-code; then git commit -am \"chore: auto update version [skip ci]\" ; else echo nothing to do ; fi"
# - "git commit -am \"chore: auto update version [skip ci]\""
- "git push origin HEAD:dev"
secrets: [git_pat]
depends_on:

View File

@ -2,7 +2,10 @@
read -r msg
echo "read the following commit message: $msg"
if [[ $msg = *"BREAKING CHANGE:"* ]]; then
echo "detected breaking change, updating major version"
./update-version.sh MAJOR
fi
@ -10,10 +13,12 @@ summary=$(echo "$msg" | head -1)
type=$(cut -d':' -f1 <<< "$summary")
if [[ $type = *"!"* ]]; then
echo "detected breaking change, updating major version"
./version-update.sh MAJOR
fi
if [[ $type = "feat" ]]; then
echo "detected feature, updating minor version"
./version-update.sh MINOR
else
echo "last commit message does not indicate a base version update, skipping"

View File

@ -1 +1 @@
1.0
0.2