Created
July 8, 2015 09:48
-
-
Save ZdrowyGosciu/d6ef771420e3c897d9b6 to your computer and use it in GitHub Desktop.
rom-make-changelog
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
# Generate changelog from REPOs by Zdrowy Gosciu | |
# | |
# Usage : | |
# make-changelog UTC_TIMESTAMP (from last build.prop = ro.build.date.utc) | |
# e.g. make-changelog 1436063245 | |
# Output : DD-MM-YYYY.txt | |
# | |
DZIEN=`date -u -d @$1 +"%d"` | |
MIESIAC=`date -u -d @$1 +"%m"` | |
ROK=`date -u -d @$1 +"%Y"` | |
PLIK=$DZIEN-$MIESIAC-$ROK.txt | |
AFTER=`date -u -d @$1 +"%Y-%m-%d @ %H:%M:%S"` | |
CDIR=`pwd` | |
if [ ! -z "$2" ]; then | |
CDIR=$2 | |
fi | |
echo -e "CHANGELOG > $CDIR/$PLIK\n" | |
echo -e "CHANGES AFTER $AFTER ($1)" > $CDIR/$PLIK | |
echo "" >> $CDIR/$PLIK | |
echo " ______ ______ " >> $CDIR/$PLIK | |
echo " .-----.-----| __ | __|" >> $CDIR/$PLIK | |
echo " |-- __| _ | __ |__ |" >> $CDIR/$PLIK | |
echo " |_____|___ |______|______|" >> $CDIR/$PLIK | |
echo " |_____| " >> $CDIR/$PLIK | |
repo forall -pc "git log --date=short --pretty=format:'%h # %cd # %an @ %s' --after=$1 --date-order" | sed -r 's/^project /\n* Project /g' >> $PLIK | |
cat $CDIR/$PLIK | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment