1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

add -i suffix -e for macos

This commit is contained in:
Esteban MIno 2018-11-08 14:51:07 -03:00 committed by Dan Finlay
parent 37adf145ab
commit a2bb08002c

View File

@ -8,15 +8,15 @@ URL=$(echo $ORIGIN | sed -E 's/(.*).git{1}(.*)/\1/')
LOG=$(git log $(git describe --tags $(git rev-list --tags --max-count=1))..HEAD --pretty="%s::%b" --reverse --grep="Merge pull request #" --grep="(#"); 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 while read -r line; do
# get git log subject # get git log subject
SUBJECT="$(echo $line | sed -E 's/(.*):{2}(.*)/\1/')" SUBJECT=$(echo $line | sed -E 's/(.*):{2}(.*)/\1/')
# get git log PR id, PR made with Github squash merge or Github regular merge # get git log PR id, PR made with Github squash merge or Github regular merge
PR=$(echo $SUBJECT | sed 's/^.*(#\([^&]*\)).*/\1/' | sed 's/^.*#\([^&]*\) from.*/\1/') PR=$(echo $SUBJECT | sed 's/^.*(#\([^&]*\)).*/\1/' | sed 's/^.*#\([^&]*\) from.*/\1/')
# if PR made with Github squash merge, subject is the body # if PR made with Github squash merge, subject is the body
if [ -z "$(echo $line | sed -E 's/(.*):{2}(.*)/\2/')" ]; then if [ -z $(echo $line | sed -E 's/(.*):{2}(.*)/\2/') ]; then
BODY=$(echo $SUBJECT | sed "s/(#$PR)//g"); else BODY=$(echo $SUBJECT | sed "s/(#$PR)//g"); else
BODY=$(echo $line | sed -E 's/(.*):{2}(.*)/\2/') BODY=$(echo $line | sed -E 's/(.*):{2}(.*)/\2/')
fi fi
# add entry to CHANGELOG # add entry to CHANGELOG
sed -i "" "/## Current Develop Branch/a - [#$PR]($URL/pull/$PR): $BODY" CHANGELOG.md; sed -i'' -e "/## Current Develop Branch/a - [#$PR]($URL/pull/$PR): $BODY" CHANGELOG.md;
done <<< "$LOG" done <<< "$LOG"
echo "CHANGELOG updated" echo 'CHANGELOG updated'