blob: f70b0e0fbd35d6fd0db9dc6abd58ba50cfb6674d [file] [log] [blame]
johnnyslte0e2ffc2015-01-12 08:10:55 -02001#!/bin/sh
2
3# Exports
Jackeagle77c94342019-09-14 09:59:26 -04004#. $ANDROID_BUILD_TOP/vendor/bliss/tools/colors
johnnyslte0e2ffc2015-01-12 08:10:55 -02005
6export Changelog=Changelog.txt
7
8if [ -f $Changelog ];
9then
10 rm -f $Changelog
11fi
12
13touch $Changelog
14
15# Print something to build output
16echo ${bldppl}"Generating changelog..."${txtrst}
17
pimpmaneaton756ac602019-01-16 14:00:20 -070018for i in $(seq 15);
johnnyslte0e2ffc2015-01-12 08:10:55 -020019do
20export After_Date=`date --date="$i days ago" +%m-%d-%Y`
21k=$(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
SpiritCrocbb139ae2020-04-09 18:08:35 +020031 CURRENT_PATH="$(realpath `pwd`)"
32 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
johnnyslte0e2ffc2015-01-12 08:10:55 -020033 echo >> $Changelog;
34done
35
36sed -i 's/project/ */g' $Changelog
37
david110b8432015-02-02 08:52:14 +010038cp $Changelog $OUT/system/etc/
johnnyslte0e2ffc2015-01-12 08:10:55 -020039cp $Changelog $OUT/
40rm $Changelog