aboutsummaryrefslogtreecommitdiffstats
path: root/.circleci/scripts/show-changelog.awk
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2019-08-07 05:53:50 +0800
committerGitHub <noreply@github.com>2019-08-07 05:53:50 +0800
commitdb08881d4527e8a037f401ef22b849e52152864f (patch)
tree6032d7a4ae67371889eece1d8490c26d5a119dd5 /.circleci/scripts/show-changelog.awk
parent4139019d0f4dd83f56da400ca7e0e6d1976d1716 (diff)
parent86ad9564a064fd6158dab6a3c9e5b10614ef6e68 (diff)
downloadtangerine-wallet-browser-7.0.0.tar
tangerine-wallet-browser-7.0.0.tar.gz
tangerine-wallet-browser-7.0.0.tar.bz2
tangerine-wallet-browser-7.0.0.tar.lz
tangerine-wallet-browser-7.0.0.tar.xz
tangerine-wallet-browser-7.0.0.tar.zst
tangerine-wallet-browser-7.0.0.zip
Merge pull request #6969 from MetaMask/developv7.0.0
Master Version Bump
Diffstat (limited to '.circleci/scripts/show-changelog.awk')
-rw-r--r--.circleci/scripts/show-changelog.awk52
1 files changed, 52 insertions, 0 deletions
diff --git a/.circleci/scripts/show-changelog.awk b/.circleci/scripts/show-changelog.awk
new file mode 100644
index 000000000..e490df9db
--- /dev/null
+++ b/.circleci/scripts/show-changelog.awk
@@ -0,0 +1,52 @@
+# 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;
+}