johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Exports |
| 4 | |
| 5 | . $ANDROID_BUILD_TOP/vendor/bliss/tools/colors |
| 6 | |
| 7 | export Changelog=Changelog.txt |
| 8 | |
| 9 | if [ -f $Changelog ]; |
| 10 | then |
| 11 | rm -f $Changelog |
| 12 | fi |
| 13 | |
| 14 | touch $Changelog |
| 15 | |
| 16 | # Print something to build output |
| 17 | echo ${bldppl}"Generating changelog..."${txtrst} |
| 18 | |
pimpmaneaton | 1420dfd | 2019-01-16 14:00:20 -0700 | [diff] [blame^] | 19 | for i in $(seq 15); |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 20 | do |
| 21 | export After_Date=`date --date="$i days ago" +%m-%d-%Y` |
| 22 | k=$(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; |
| 34 | done |
| 35 | |
| 36 | sed -i 's/project/ */g' $Changelog |
| 37 | |
david | 769eb1f | 2015-02-02 08:52:14 +0100 | [diff] [blame] | 38 | cp $Changelog $OUT/system/etc/ |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 39 | cp $Changelog $OUT/ |
| 40 | rm $Changelog |