File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ 0.0.19] - 2026-02-04
99
10- ### Changed
11- - Version bump
10+ ### Documentation
11+ - 更新发布脚本和变更日志格式
12+
13+ ### Chore
14+ - 修复 CHANGELOG 生成脚本兼容 macOS bash 3.x
1215
1316
1417## [ 0.0.18] - 2026-02-04
Original file line number Diff line number Diff line change @@ -81,28 +81,26 @@ generate_changelog_content() {
8181 local added=" " changed=" " fixed=" " docs=" " chore=" "
8282
8383 while IFS= read -r line; do
84- if [[ " $line " =~ ^([a-z]+) ]]; then
85- local type=" ${BASH_REMATCH[1]} "
86- local msg=" ${line#*: } "
87-
88- case " $type " in
89- feat)
90- added=" $added \n- $msg "
91- ;;
92- fix)
93- fixed=" $fixed \n- $msg "
94- ;;
95- docs)
96- docs=" $docs \n- $msg "
97- ;;
98- chore)
99- chore=" $chore \n- $msg "
100- ;;
101- refactor|perf|style)
102- changed=" $changed \n- $msg "
103- ;;
104- esac
105- fi
84+ local type=$( echo " $line " | cut -d: -f1 | cut -d' (' -f1)
85+ local msg=$( echo " $line " | cut -d: -f2- | sed ' s/^ //' )
86+
87+ case " $type " in
88+ feat)
89+ added=" $added \n- $msg "
90+ ;;
91+ fix)
92+ fixed=" $fixed \n- $msg "
93+ ;;
94+ docs)
95+ docs=" $docs \n- $msg "
96+ ;;
97+ chore)
98+ chore=" $chore \n- $msg "
99+ ;;
100+ refactor|perf|style)
101+ changed=" $changed \n- $msg "
102+ ;;
103+ esac
106104 done < <( git log --pretty=format:" %s" $range 2> /dev/null)
107105
108106 local content=" "
You can’t perform that action at this time.
0 commit comments