File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ UNRELEASED_BLOCK=$(awk '
100100' CHANGELOG.md)
101101
102102if [[ -z " ${UNRELEASED_BLOCK// $' \n ' / } " ]]; then
103+ HEAD_SUBJECT=" $( git log -1 --pretty=%s) "
104+ if [[ " $HEAD_SUBJECT " =~ ^chore\( release\) :\ [0-9]+\. [0-9]+\. [0-9]+$ ]]; then
105+ echo " Changelog gate passed (release commit allows empty ## [Unreleased])."
106+ exit 0
107+ fi
103108 echo " ERROR: ## [Unreleased] section is empty."
104109 exit 1
105110fi
Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ trap 'rm -rf "$tmp_dir"' EXIT
104104stripped_changelog=" ${tmp_dir} /changelog-stripped.md"
105105new_section_file=" ${tmp_dir} /new-section.md"
106106updated_changelog=" ${tmp_dir} /CHANGELOG.md"
107- post_release_unreleased_bullet=" - Initialize post-${version} unreleased section."
108107
109108awk '
110109 BEGIN { skip = 0 }
@@ -126,13 +125,11 @@ awk '
126125 echo " $compare_link "
127126} > " $new_section_file "
128127
129- awk -v section_file=" $new_section_file " -v post_bullet= " $post_release_unreleased_bullet " '
128+ awk -v section_file=" $new_section_file " '
130129 BEGIN { inserted = 0; skip_next_blank = 0 }
131130 $0 == "## [Unreleased]" && inserted == 0 {
132131 print
133132 print ""
134- print post_bullet
135- print ""
136133 while ((getline line < section_file) > 0) {
137134 print line
138135 }
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Targeted test suites (when working on specific areas):
4848- Required format for regular commits:
4949 - add at least one short, single-line bullet under ` ## [Unreleased] ` .
5050- Scope is strict (no exceptions for docs/process/policy/chore/dependency-only commits).
51+ - Exception: release commits (` chore(release): X.Y.Z ` ) may leave ` ## [Unreleased] ` empty.
5152- Local preflight command:
5253 - ` make verify-changelog `
5354- CI enforces this on both PRs and direct pushes to ` main ` .
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ All notable changes to FScript are documented in this file.
44
55## [ Unreleased]
66
7- - Initialize post-0.38.2 unreleased section .
7+ - Updated changelog gating and release preparation so release commits can leave ` ## [Unreleased] ` empty without placeholder bullets .
88
99## [ 0.38.2]
1010
You can’t perform that action at this time.
0 commit comments