-
-
Save AnnikaCodes/49ea9f34e860e78b1a4b004164d4c3c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
SERVER=$1 | |
CLIENT=$2 | |
SINCE="2019-08-01" | |
BEFORE="$(date "+%Y-%m-%d")" | |
TMP=$(mktemp) | |
trap "rm -f $TMP" 0 2 3 15 | |
sync() { | |
git checkout master &>/dev/null | |
git fetch upstream &>/dev/null | |
git merge upstream/master &>/dev/null | |
git push origin master &>/dev/null | |
} | |
cd $SERVER && sync | |
git --no-pager log --pretty="%ad|(https://github.com/smogon/pokemon-showdown/commit/%H) - %s thanks to|%an" --since="$SINCE" --before="$BEFORE" --date=iso8601 > $TMP | |
cd $CLIENT && sync | |
git --no-pager log --pretty="%ad|(https://github.com/smogon/pokemon-showdown-client/commit/%H) - %s thanks to|%an" --since="$SINCE" --before="$BEFORE" --date=iso8601 >> $TMP | |
sort $TMP | ruby <(cat <<HERE | |
NAMES = { | |
'Jacob McLemore' => 'McLemore', | |
'Guangcong Luo' => 'Zarel', | |
'whales' => 'jumbowhales', | |
'Marty-D' => 'Marty', | |
'TheJetOU' => 'jetou', | |
'Konrad Borowski' => 'xfix', | |
'Ben Davies' => 'Morfent', | |
'LegoFigure11' => 'Lego', | |
} | |
def toSmogonUsername(name) | |
"**@#{NAMES[name] || name}**" | |
end | |
ARGF.each_line do |line| | |
split = line.split('|').map(&:strip) | |
cmd = "date -d '#{split[0]}' +'%B %e'" | |
date = %x(#{cmd}).chomp | |
puts " - [#{date}]#{split[1]} #{toSmogonUsername(split[2])}" | |
end | |
HERE | |
) | |
echo "---" | |
echo "### Features" | |
echo | |
echo "### Bug Fixes" | |
echo | |
echo "### Staff" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment