From dc552f52993b6495409ddde2c89ccd1a82804a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Barb=C3=A1chano?= Date: Thu, 30 Nov 2023 16:50:20 +0100 Subject: [PATCH] release: officially adopt Keep a Changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are already using the format so might as well link to where it comes from. Also adjust the release-notes.sh line to account for 5 additional lines at the top. Signed-off-by: Pablo Barbáchano --- CHANGELOG.md | 5 +++++ tools/release-notes.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccda87c3eb3..4517094e9c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + ## [Unreleased] ### Added diff --git a/tools/release-notes.sh b/tools/release-notes.sh index cc5ce526f68..bee517d840a 100755 --- a/tools/release-notes.sh +++ b/tools/release-notes.sh @@ -26,7 +26,8 @@ changelog="$FC_ROOT_DIR/CHANGELOG.md" # Patterns for the sections in the changelog corresponding to the versions. pat_curr="/^##\s\[$curr_ver\]/" -pat_prev="/^##\s\[.+]/ && NR>3" +# Match the previous version, skipping the 8 lines at the top. +pat_prev="/^##\s\[.+]/ && NR>8" # Extract the section enclosed between the 2 headers and strip off the first # 2 and last 2 lines (one is blank and one contains the header `## [A.B.C]`). # Then, replace `-` with `*` and remove section headers.