88# From 5.x, each changelog only contains its own version changes and
99# references the prior changelogs with links, so on a version bump this
1010# script:
11- # - Resets the changelog to a single "## [vX.Y.Z]" entry with empty
12- # Added/Changed/Removed/Fixed sections, where Added starts with the
13- # "- Support for Wazuh X.Y.Z" entry .
11+ # - Resets the changelog to a single "## [vX.Y.Z]" entry with an empty
12+ # "| Issue | Comment |" table under each of the Added/Changed/
13+ # Removed/Fixed sections .
1414# - Rebuilds the "## Prior versions" section with the two most recent
1515# minors below the new version, including every patch of each,
1616# newest first.
@@ -112,7 +112,18 @@ function print_prior_versions_section() {
112112}
113113
114114# ====
115- # Rewrite CHANGELOG.md with the new version entry (empty sections) and the
115+ # Print a changelog section heading followed by an empty entries table.
116+ # Arguments:
117+ # $1 - section name (Added, Changed, Removed, Fixed)
118+ # ====
119+ function print_section() {
120+ printf ' ### %s\n\n' " $1 "
121+ printf ' | Issue | Comment |\n'
122+ printf ' | ----- | ------- |\n\n'
123+ }
124+
125+ # ====
126+ # Rewrite CHANGELOG.md with the new version entry (empty tables) and the
116127# rebuilt "## Prior versions" section.
117128# Arguments:
118129# $1 - new version
@@ -124,11 +135,10 @@ function write_changelog() {
124135
125136 {
126137 printf ' ## [v%s]\n\n' " $new_version "
127- printf ' ### Added\n\n'
128- printf -- ' - Support for Wazuh %s\n\n' " $new_version "
129- printf ' ### Changed\n\n'
130- printf ' ### Removed\n\n'
131- printf ' ### Fixed\n\n'
138+ print_section ' Added'
139+ print_section ' Changed'
140+ print_section ' Removed'
141+ print_section ' Fixed'
132142 print_prior_versions_section " $new_version "
133143 } > " $temp_file "
134144
0 commit comments