From 6dce32fc1ee32cbff4cd272629a7fa2dd7dfd47c Mon Sep 17 00:00:00 2001 From: Esteban MIno Date: Wed, 7 Nov 2018 23:02:12 -0300 Subject: [PATCH] provide automatic changelog since last tag for linux --- CHANGELOG.md | 2 ++ auto-changelog.sh | 14 ++++++++++++++ package.json | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 auto-changelog.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cdb2f757..bc9158c23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Current Develop Branch +- [#5694](https://github.com/MetaMask/metamask-extension/pull/5694): Version 5.0.1 +- [#5547](https://github.com/MetaMask/metamask-extension/pull/5547): Bundle some ui dependencies separately to limit the build size of ui.js - Resubmit approved transactions on new block, to fix bug where an error can stick transactions in this state. 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" diff --git a/package.json b/package.json index 4077f99db..62e0f4fb2 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,8 @@ "disc": "gulp disc --debug", "announce": "node development/announcer.js", "version:bump": "node development/run-version-bump.js", - "storybook": "start-storybook -p 6006 -c .storybook" + "storybook": "start-storybook -p 6006 -c .storybook", + "update-changelog": "./auto-changelog.sh" }, "browserify": { "transform": [