blob: 3cb1fe43d48c26544917c4355dc84b44fb7fcfda [file] [log] [blame]
johnnyslt0f744332015-01-12 08:10:55 -02001#!/bin/sh
2
3# Exports
4
5. $ANDROID_BUILD_TOP/vendor/bliss/tools/colors
6
7export Changelog=Changelog.txt
8
9if [ -f $Changelog ];
10then
11 rm -f $Changelog
12fi
13
14touch $Changelog
15
16# Print something to build output
17echo ${bldppl}"Generating changelog..."${txtrst}
18
19for i in $(seq 5);
20do
21export After_Date=`date --date="$i days ago" +%m-%d-%Y`
22k=$(expr $i - 1)
23 export Until_Date=`date --date="$k days ago" +%m-%d-%Y`
24
25 # Line with after --- until was too long for a small ListView
26 echo '====================' >> $Changelog;
27 echo " "$Until_Date >> $Changelog;
28 echo '====================' >> $Changelog;
29 echo >> $Changelog;
30
31 # Cycle through every repo to find commits between 2 dates
32 repo forall -pc 'git log --oneline --after=$After_Date --until=$Until_Date' >> $Changelog
33 echo >> $Changelog;
34done
35
36sed -i 's/project/ */g' $Changelog
37
38cp $Changelog $OUT/
39rm $Changelog