1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/.circleci/scripts/show-changelog.awk
Whymarrh Whitby 83c2440509 Add scripts to automate GitHub releases (#6653)
* ci: Rename full_test to test_and_release

* ci: Add scripts to automate GH releases

* Add .bak files to .gitignore

* ci: Add reviewer to the auto version PR
2019-07-17 22:51:47 -07:00

53 lines
1.2 KiB
Awk

# DESCRIPTION
#
# This script will print out all of the CHANGELOG.md lines for a given version
# with the assumption that the CHANGELOG.md files looks something along the
# lines of:
#
# ```
# ## 6.6.2 Fri Jun 07 2019
#
# - [#6690](https://github.com/MetaMask/metamask-extension/pull/6690): Some words
# - [#6700](https://github.com/MetaMask/metamask-extension/pull/6700): some more words
#
# ## 6.6.1 Thu Jun 06 2019
#
# - [#6691](https://github.com/MetaMask/metamask-extension/pull/6691): Revert other words
#
# ## 6.6.0 Mon Jun 03 2019
#
# - [#6659](https://github.com/MetaMask/metamask-extension/pull/6659): foo
# - [#6671](https://github.com/MetaMask/metamask-extension/pull/6671): bar
# - [#6625](https://github.com/MetaMask/metamask-extension/pull/6625): baz
# - [#6633](https://github.com/MetaMask/metamask-extension/pull/6633): Many many words
#
#
# ```
#
# EXAMPLE
#
# Run this script like so, passing in the version:
#
# ```
# awk -v version='6.6.0' -f .circleci/scripts/show-changelog.awk CHANGELOG.md
# ```
#
BEGIN {
inside_section = 0;
}
$1 == "##" && $2 == version {
inside_section = 1;
next;
}
$1 == "##" && $2 != version {
inside_section = 0;
next;
}
inside_section && !/^$/ {
print $0;
}