aboutsummaryrefslogtreecommitdiffstats
path: root/auto-changelog.sh
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-11-08 10:02:12 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2018-11-16 02:12:11 +0800
commit6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c (patch)
tree570f7c26b63c1ede0c87b253ae83574e95cb2b27 /auto-changelog.sh
parent592e6bddfb84b0cafa96b6f32ccf5ff5edab793c (diff)
downloadtangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar.gz
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar.bz2
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar.lz
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar.xz
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.tar.zst
tangerine-wallet-browser-6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c.zip
provide automatic changelog since last tag for linux
Diffstat (limited to 'auto-changelog.sh')
-rwxr-xr-xauto-changelog.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/auto-changelog.sh b/auto-changelog.sh
new file mode 100755
index 000000000..3e974c8bc
--- /dev/null
+++ b/auto-changelog.sh
@@ -0,0 +1,14 @@
+#! /bin/bash
+git fetch --tags
+URL="https://github.com/MetaMask/metamask-extension/pull/"
+LOG=$(git log $(git describe --tags $(git rev-list --tags --max-count=1))..HEAD --pretty="%s::%b" --reverse --grep="Merge pull request #" --grep="(#");
+while read -r line; do
+ SUBJECT="$(echo $line | sed -E 's/(.*):{2}(.*)/\1/')"
+ PR=$(echo $line | grep -Po '#\d+' | sed "s/#//")
+ if [ -z "$(echo $line | sed -E 's/(.*):{2}(.*)/\2/')" ]; then
+ MESSAGE=$(echo $SUBJECT | sed "s/(#$PR)//g"); else
+ MESSAGE=$(echo $line | sed -E 's/(.*):{2}(.*)/\2/')
+ fi
+ sed -i "/## Current Develop Branch/a - [#$PR]($URL$PR): $MESSAGE" CHANGELOG.md;
+done <<< "$LOG"
+echo "CHANGELOG updated"