-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
165 changed files
with
5,327 additions
and
4,444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ $# -eq 0 ]]; then | ||
echo "No arguments provided. Usage: generate-release-notes.sh <version>" | ||
exit 1 | ||
fi | ||
|
||
version=$1 | ||
|
||
# Release version number without "v" prefix to match the format of changelog.json. | ||
version_number="${version#v}" | ||
|
||
# This parses the JSON blob for this specific version from changelog.json. | ||
changelog="$( | ||
jq --arg version "$version_number" --compact-output \ | ||
'.changelog [] | select(.ver == $version)' \ | ||
data/changelog.json | ||
)" | ||
|
||
if [[ -z "$changelog" ]]; then | ||
echo "Changelog entry for version $version does not exist." | ||
exit 1 | ||
fi | ||
|
||
{ | ||
# The "hub" tool reads all text up to the first empty line as the release | ||
# title. | ||
# * For changelog entries with a title, this is formatted as | ||
# '<version>, "<title>" Edition' to match the format of the site's | ||
# changelog page. | ||
# | ||
# * For changelog entries without a title, this is formatted as simply | ||
# '<version>'. | ||
echo -n "$version" | ||
jq -r 'if has("title") then ", \(.title | tojson) Edition\n" else "\n" end' <<< "$changelog" | ||
|
||
# Some changelogs include an alternate title. This is included in the body | ||
# of the release notes and formatted as 'AKA "<altTitle>" Edition' to match | ||
# the site's changelog page. | ||
jq -j 'if has("titleAlt") then "AKA \(.titleAlt | tojson) Edition\n" else "" end' <<< "$changelog" | ||
|
||
# Changelog text is already markdown-formatted, so no additional formatting | ||
# needs to be done here. | ||
jq -r '.txt' <<< "$changelog" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ secrets | |
|
||
# Visual Studio Code project files | ||
.vscode/ | ||
*.code-workspace | ||
|
||
# Generated files | ||
sitemap.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.