-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scripts, .github/workflows: add script to extract changelog (#689)
* scripts, .github/workflows: add script to extract changelog the release workflow will use the script to extract the changelog and uses it to create a release note. It also uses tag name to determine if the release is pre-release or not. --------- Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
# Inspired by https://stackoverflow.com/questions/40450238/parse-a-changelog-and-extract-changes-for-a-version | ||
# This script will extract the changelog for a specific version from the CHANGELOG.md file | ||
# Usage: ./extract-changelog.sh <version> | ||
version=$1 | ||
|
||
awk -v ver="$version" ' | ||
/^## \[.*\]/ { | ||
if (p) exit | ||
if ($0 ~ "^## \\[" ver "\\]") { p=1; next } | ||
} | ||
p' crates/containerd-shim-wasm/CHANGELOG.md |