From 7dee94da6f030879424cd837bae54361a5242867 Mon Sep 17 00:00:00 2001 From: MasterAcnolo Date: Fri, 11 Sep 2026 11:01:12 +0200 Subject: [PATCH] refactor: extract CHANGELOG into a separated file. Should avoid characters issue --- scripts/CHANGELOG.md | 1 + scripts/release.sh | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 scripts/CHANGELOG.md diff --git a/scripts/CHANGELOG.md b/scripts/CHANGELOG.md new file mode 100644 index 0000000..f5c3c0d --- /dev/null +++ b/scripts/CHANGELOG.md @@ -0,0 +1 @@ +[//]: # (This file is used for the release CHANGELOG. Please use Markdown to describe changes.) \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index bf7393a..0816e80 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" VERSION=$(node -p "require('$ROOT_DIR/package.json').version") -f [[ "$VERSION" == *"-preview"* ]]; then +if [[ "$VERSION" == *"-preview"* ]]; then echo "Error: The current version ($VERSION) is a 'preview" echo "Unable to launch release pipeline. Please update the package.json with a stable version.." exit 1 @@ -64,6 +64,16 @@ echo "[0/5] Cleaning workspace..." rm -rf "$ROOT_DIR/dist" "$ROOT_DIR/srpm-out" echo "Workspace cleaned (dist/ and srpm-out/ removed)" +# ------------------------------------------------------------ +# Step 0.3 - Retrieve Changelog +# ------------------------------------------------------------ +if [ ! -f "$ROOT_DIR/CHANGELOG.md" ]; then + echo "Warning: CHANGELOG.md not found, release notes will be empty." + CHANGELOG="" +else + CHANGELOG="$(cat "$ROOT_DIR/CHANGELOG.md")" + echo "Changelog retrieved successfully" +fi # ------------------------------------------------------------ # Step 1 - Build Linux packages (AppImage, deb, snap) # ------------------------------------------------------------ @@ -105,6 +115,10 @@ PREV_TAG=$(git rev-list --tags --skip=1 --max-count=1 | xargs git describe --tag RELEASE_NOTES="# Freedom Loader - $VERSION +## Changelog + +$CHANGELOG + ## Found a bug or issue? Please report it in the [GitHub Issues](https://github.com/MasterAcnolo/Freedom-Loader/issues) section.