johnnyslt | e0e2ffc | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Exports |
Jackeagle | 77c9434 | 2019-09-14 09:59:26 -0400 | [diff] [blame] | 4 | #. $ANDROID_BUILD_TOP/vendor/bliss/tools/colors |
johnnyslt | e0e2ffc | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 5 | |
| 6 | export Changelog=Changelog.txt |
| 7 | |
| 8 | if [ -f $Changelog ]; |
| 9 | then |
| 10 | rm -f $Changelog |
| 11 | fi |
| 12 | |
| 13 | touch $Changelog |
| 14 | |
| 15 | # Print something to build output |
| 16 | echo ${bldppl}"Generating changelog..."${txtrst} |
| 17 | |
pimpmaneaton | 756ac60 | 2019-01-16 14:00:20 -0700 | [diff] [blame] | 18 | for i in $(seq 15); |
johnnyslt | e0e2ffc | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 19 | do |
| 20 | export After_Date=`date --date="$i days ago" +%m-%d-%Y` |
| 21 | k=$(expr $i - 1) |
| 22 | export Until_Date=`date --date="$k days ago" +%m-%d-%Y` |
| 23 | |
| 24 | # Line with after --- until was too long for a small ListView |
| 25 | echo '====================' >> $Changelog; |
| 26 | echo " "$Until_Date >> $Changelog; |
| 27 | echo '====================' >> $Changelog; |
| 28 | echo >> $Changelog; |
| 29 | |
| 30 | # Cycle through every repo to find commits between 2 dates |
Jackeagle | 9a3a44c | 2019-09-18 02:52:59 -0400 | [diff] [blame] | 31 | prebuilts/tools-bliss/linux-x86/bin/repo forall -pc 'git log --oneline --after=$After_Date --until=$Until_Date' >> $Changelog |
johnnyslt | e0e2ffc | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 32 | echo >> $Changelog; |
| 33 | done |
| 34 | |
| 35 | sed -i 's/project/ */g' $Changelog |
| 36 | |
david | 110b843 | 2015-02-02 08:52:14 +0100 | [diff] [blame] | 37 | cp $Changelog $OUT/system/etc/ |
johnnyslt | e0e2ffc | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 38 | cp $Changelog $OUT/ |
| 39 | rm $Changelog |