blob: d9860614c523bbb09ff959570c5acd97ddf9ea94 [file] [log] [blame]
johnnyslt0f744332015-01-12 08:10:55 -02001#!/bin/sh
2
3# Exports
4
5. $ANDROID_BUILD_TOP/vendor/bliss/tools/colors
6
7export Changelog=Changelog.txt
8
9if [ -f $Changelog ];
10then
11 rm -f $Changelog
12fi
13
14touch $Changelog
15
16# Print something to build output
17echo ${bldppl}"Generating changelog..."${txtrst}
18
pimpmaneaton1420dfd2019-01-16 14:00:20 -070019for i in $(seq 15);
johnnyslt0f744332015-01-12 08:10:55 -020020do
21export After_Date=`date --date="$i days ago" +%m-%d-%Y`
22k=$(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
SpiritCroc2246af82020-04-09 18:08:35 +020032 CURRENT_PATH="$(realpath `pwd`)"
33 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
johnnyslt0f744332015-01-12 08:10:55 -020034 echo >> $Changelog;
35done
36
37sed -i 's/project/ */g' $Changelog
38
david769eb1f2015-02-02 08:52:14 +010039cp $Changelog $OUT/system/etc/
johnnyslt0f744332015-01-12 08:10:55 -020040cp $Changelog $OUT/
41rm $Changelog