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 | |
| 27 | # Cycle through every repo to find commits between 2 dates |
SpiritCroc | 2246af8 | 2020-04-09 18:08:35 +0200 | [diff] [blame] | 28 | CURRENT_PATH="$(realpath `pwd`)" |
| 29 | repo forall -c "GIT_LOG=\`git log --oneline --after=$After_Date --until=$Until_Date\` ; if [ ! -z \"\$GIT_LOG\" ]; then printf '\n * '; realpath \`pwd\` | sed 's|^$CURRENT_PATH/||' ; echo \"\$GIT_LOG\"; fi" >> $Changelog |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 30 | echo >> $Changelog; |
| 31 | done |
| 32 | |
| 33 | sed -i 's/project/ */g' $Changelog |
| 34 | |
david | 769eb1f | 2015-02-02 08:52:14 +0100 | [diff] [blame] | 35 | cp $Changelog $OUT/system/etc/ |
johnnyslt | 0f74433 | 2015-01-12 08:10:55 -0200 | [diff] [blame] | 36 | cp $Changelog $OUT/ |
| 37 | rm $Changelog |