@@ -5,7 +5,7 @@ if [ "$RELEASE_BRANCH" = "release" ]; then
55 RELEASE_TYPE=" Stable"
66
77 echo " Fetching release notes from GitHub..."
8- RELEASE_NOTES_JSON=$( curl -s " $RELEASE_NOTES_URL " )
8+ RELEASE_NOTES_JSON=$( curl -s --retry 5 --retry-delay 5 " $RELEASE_NOTES_URL " )
99
1010 if [ -z " $RELEASE_NOTES_JSON " ]; then
1111 echo " Error: Failed to fetch release notes from GitHub"
1818 RELEASE_TYPE=" Twilight"
1919fi
2020
21- cat << EOF > "release_notes.md"
22- # Zen ${RELEASE_TYPE} Release
23- EOF
21+ {
22+ echo " # Zen ${RELEASE_TYPE} Release"
2423
25- if [ " $RELEASE_BRANCH " = " release" ]; then
26- echo " ${EXTRA_NOTES} " >> " release_notes.md"
27-
28- if echo " $LATEST_RELEASE " | jq -e ' (.features // []) | length > 0' > /dev/null; then
29- cat << EOF >> "release_notes.md"
30-
31- ## New Features
32- $( echo " $LATEST_RELEASE " | jq -r ' .features[] | "- " + .' )
33- EOF
34- fi
35-
36- if echo " $LATEST_RELEASE " | jq -e ' (.fixes // []) | length > 0' > /dev/null; then
37- cat << EOF >> "release_notes.md"
38-
39- ## Fixes
40- EOF
41- echo " $LATEST_RELEASE " | jq -r ' .fixes[] | if type=="object" then "- " + .description + " ([#" + (.issue|tostring) + "](" + "https://github.com/zen-browser/desktop/issues/" + (.issue|tostring) + "))" else "- " + . end' >> " release_notes.md"
24+ if [ " $RELEASE_TYPE " = " Twilight" ]; then
25+ echo
26+ echo " > [!NOTE]"
27+ echo " > You're currently in Twilight mode, this means you're downloading the latest experimental features and updates."
28+ echo " >"
29+ echo " > If you encounter any issues, please report them on the [issues page](https://github.com/zen-browser/desktop/issues)."
4230 fi
4331
44- if echo " $LATEST_RELEASE " | jq -e ' (.breakingChanges // []) | length > 0' > /dev/null; then
45- cat << EOF >> "release_notes.md"
46-
47- ## Breaking Changes
48- EOF
49- echo " $LATEST_RELEASE " | jq -r ' .breakingChanges[] | if type=="string" then "- " + . else "- " + .description + " [Learn more](" + .link + ")" end' >> " release_notes.md"
50- fi
51-
52- if echo " $LATEST_RELEASE " | jq -e ' (.themeChanges // []) | length > 0' > /dev/null; then
53- cat << EOF >> "release_notes.md"
54-
55- ## Theme Changes
56- $( echo " $LATEST_RELEASE " | jq -r ' .themeChanges[] | "- " + .' )
57- EOF
32+ if [ " $RELEASE_TYPE " = " Stable" ]; then
33+ echo " ${EXTRA_NOTES} "
34+
35+ if echo " $LATEST_RELEASE " | jq -e ' .security != null and .security != ""' > /dev/null; then
36+ echo
37+ echo " ## Security"
38+ echo " [Various security fixes]($( echo " $LATEST_RELEASE " | jq -r ' .security' ) )"
39+ fi
40+
41+ if echo " $LATEST_RELEASE " | jq -e ' (.features // []) | length > 0' > /dev/null; then
42+ echo
43+ echo " ## New Features"
44+ echo " $LATEST_RELEASE " | jq -r ' .features[] | "- " + .'
45+ fi
46+
47+ if echo " $LATEST_RELEASE " | jq -e ' (.fixes // []) | length > 0' > /dev/null; then
48+ echo
49+ echo " ## Fixes"
50+ echo " $LATEST_RELEASE " | jq -r ' .fixes[] | if type=="object" then "- " + .description + " ([#" + (.issue|tostring) + "](" + "https://github.com/zen-browser/desktop/issues/" + (.issue|tostring) + "))" else "- " + . end'
51+ fi
52+
53+ if echo " $LATEST_RELEASE " | jq -e ' (.breakingChanges // []) | length > 0' > /dev/null; then
54+ echo
55+ echo " ## Breaking Changes"
56+ echo " $LATEST_RELEASE " | jq -r ' .breakingChanges[] | if type=="string" then "- " + . else "- " + .description + " [Learn more](" + .link + ")" end'
57+ fi
58+
59+ if echo " $LATEST_RELEASE " | jq -e ' (.themeChanges // []) | length > 0' > /dev/null; then
60+ echo
61+ echo " ## Theme Changes"
62+ echo " $LATEST_RELEASE " | jq -r ' .themeChanges[] | "- " + .'
63+ fi
64+
65+ if echo " $LATEST_RELEASE " | jq -e ' (.changes // []) | length > 0' > /dev/null; then
66+ echo
67+ echo " ## Changes"
68+ echo " $LATEST_RELEASE " | jq -r ' .changes[] | "- " + .'
69+ fi
70+
71+ if echo " $LATEST_RELEASE " | jq -e ' (.knownIssues // []) | length > 0' > /dev/null; then
72+ echo
73+ echo " ## Known Issues"
74+ echo " $LATEST_RELEASE " | jq -r ' .knownIssues[] | "- " + .'
75+ fi
5876 fi
59- fi
60-
61- cat << EOF >> "release_notes.md"
62-
63- <details>
64- <summary>File Checksums (SHA-256)</summary>
65-
66- \`\`\`
67- EOF
68-
69- generate_checksum () {
70- local pattern=$1
71- echo " Generating checksum for $pattern "
72- sha256sum $pattern 2> /dev/null | awk ' {sub(".*/", "", $2); print $1 " " $2}' >> " release_notes.md"
73- if [ ${PIPESTATUS[0]} -ne 0 ]; then
74- echo " Warning: No files found matching $pattern , skipping checksum."
75- fi
76- }
77-
78- files=(
79- " ./zen.source.tar.zst/*"
80- " ./zen.linux-x86_64.tar.xz/*"
81- " ./zen.linux-aarch64.tar.xz/*"
82- " ./zen-x86_64.AppImage/*"
83- " ./zen-x86_64.AppImage.zsync/*"
84- " ./zen-aarch64.AppImage/*"
85- " ./zen-aarch64.AppImage.zsync/*"
86- " ./.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip"
87- " ./zen.win-x86_64.zip/*"
88- " ./.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip"
89- " ./zen.win-arm64.zip/*"
90- " ./linux.mar/*"
91- " ./linux-aarch64.mar/*"
92- " ./.github/workflows/object/windows-x64-signed-x86_64/windows.mar"
93- " ./windows.mar/*"
94- " ./.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar"
95- " ./windows-arm64.mar/*"
96- " ./macos.mar/*"
97- " ./.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe"
98- " ./zen.installer.exe/*"
99- " ./.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe"
100- " ./zen.installer-arm64.exe/*"
101- " ./zen.macos-universal.dmg/*"
102- )
103-
104- for file in " ${files[@]} " ; do
105- generate_checksum " $file "
106- done
107-
108- cat << EOF >> "release_notes.md"
109- \`\`\`
110- </details>
111- EOF
77+ } > " release_notes.md"
11278
11379echo " Release notes generated: release_notes.md"
0 commit comments