From 30df3c716b2d4d41030d8e81ba139b7576f64c4f Mon Sep 17 00:00:00 2001 From: chenwj113 Date: Wed, 29 May 2024 19:00:32 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8Dcicd=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/run.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/run.yaml b/.gitea/workflows/run.yaml index d58d1ff..0a9f532 100644 --- a/.gitea/workflows/run.yaml +++ b/.gitea/workflows/run.yaml @@ -11,13 +11,16 @@ jobs: - run: | commit_msg=${{ github.event.head_commit.message }} version=v1.0.0 - if [[ commit_msg == v* ]] then; + if [[ commit_msg == v* ]] + then version=$(echo $version | sed 's/\"//g' | awk -F"." '{$1=$1+1;$2=0;$3=0}1' OFS=".") - elif [[ commit_msg == feat* ]] then; + elif [[ commit_msg == feat* ]] + then version=$(echo $version | sed 's/\"//g' | awk -F"." '{$2=$2+1}1' OFS="." ) - elif [[ commit_msg == fix* ]] then; + elif [[ commit_msg == fix* ]] + then version=$(echo $version | sed 's/\"//g' | awk -F"." '{$3=$3+1}1' OFS="." ) - elif [[ commit_msg == bugfix* ]] then; + else version=$(echo $version | sed 's/\"//g' | awk -F"." '{$3=$3+1}1' OFS=".") fi echo $version