feat(concom): fix tag generation ref: NOISSUE
This commit is contained in:
@@ -5,10 +5,7 @@
|
||||
# minor: feat, style
|
||||
# patch: build, fix, perf, refactor, revert
|
||||
|
||||
GENERATE_VERSION=$1
|
||||
echo "Generate version: $GENERATE_VERSION"
|
||||
|
||||
PREVENT_REMOVE_FILE=$2
|
||||
PREVENT_REMOVE_FILE=$1
|
||||
TEMP_FILE_PATH=.gitea/conventional_commits/tmp
|
||||
|
||||
LAST_TAG=$(git describe --tags --abbrev=0 --always)
|
||||
@@ -65,7 +62,7 @@ start() {
|
||||
increment_type=""
|
||||
|
||||
while read message; do
|
||||
if [[ $message =~ (([a-z]+)(\(.+\))?\!:)|(BREAKING CHANGE:) ]]; then
|
||||
if [[ $message =~ (([a-zA-Z]+)(\(.+\))?\!:)|(BREAKING CHANGE:) ]]; then
|
||||
increment_type="major"
|
||||
break
|
||||
elif [[ $message =~ (^(feat|style)(\(.+\))?:) ]]; then
|
||||
@@ -82,7 +79,14 @@ start() {
|
||||
if [ -n "$increment_type" ]; then
|
||||
new_version=$(increment_version $LAST_TAG $increment_type)
|
||||
echo "New version: $new_version"
|
||||
push_newversion $new_version
|
||||
|
||||
gitchangelog | grep -v "[rR]elease:" > HISTORY.md
|
||||
git add DotnetTestLib/VERSION HISTORY.md
|
||||
git commit -m "release: version $(cat DotnetTestLib/VERSION) 🚀"
|
||||
echo "creating git tag : $(cat DotnetTestLib/VERSION)"
|
||||
git tag $(cat DotnetTestLib/VERSION)
|
||||
git push -u origin HEAD --tags
|
||||
echo "Gitea Actions will detect the new tag and release the new version."
|
||||
else
|
||||
echo "No changes requiring a version increment."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user