johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 3 | export Changelog=Changelog.txt |
| 4 | |
| 5 | if [ -f $Changelog ]; |
| 6 | then |
| 7 | rm -f $Changelog |
| 8 | fi |
| 9 | |
| 10 | touch $Changelog |
| 11 | |
| 12 | # Print something to build output |
| 13 | echo ${bldppl}"Generating changelog..."${txtrst} |
| 14 | |
pimpmaneaton | 1420dfd | 2019-01-16 14:00:20 -0700 | [diff] [blame] | 15 | for i in $(seq 15); |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 16 | do |
| 17 | export After_Date=`date --date="$i days ago" +%m-%d-%Y` |
| 18 | k=$(expr $i - 1) |
| 19 | export Until_Date=`date --date="$k days ago" +%m-%d-%Y` |
| 20 | |
| 21 | # Line with after --- until was too long for a small ListView |
| 22 | echo '====================' >> $Changelog; |
| 23 | echo " "$Until_Date >> $Changelog; |
| 24 | echo '====================' >> $Changelog; |
| 25 | echo >> $Changelog; |
| 26 | |
DennySPB | 847afd4 | 2020-04-10 11:04:55 +0300 | [diff] [blame^] | 27 | while read path; |
| 28 | do |
| 29 | Git_log=`git --git-dir ./${path}/.git log --after=$After_Date --until=$Until_Date --pretty=tformat:"%h %s [%an]" --abbrev-commit --abbrev=7` |
| 30 | if [ ! -z "${Git_log}" ]; then |
| 31 | echo "\n* ${path}\n${Git_log}\n" >> $Changelog; |
| 32 | fi |
| 33 | done < ./.repo/project.list; |
| 34 | |
| 35 | echo "" >> $Changelog; |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 36 | done |
| 37 | |
| 38 | sed -i 's/project/ */g' $Changelog |
| 39 | |
david | 769eb1f | 2015-02-02 08:52:14 +0100 | [diff] [blame] | 40 | cp $Changelog $OUT/system/etc/ |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 41 | cp $Changelog $OUT/ |
| 42 | rm $Changelog |