blob: 3e5e40a8cdd92e51a761c637ad2722f8c15d78e3 [file] [log] [blame]
johnnyslt0f744332015-01-12 08:10:55 -02001#!/bin/sh
2
johnnyslt0f744332015-01-12 08:10:55 -02003export Changelog=Changelog.txt
4
5if [ -f $Changelog ];
6then
7 rm -f $Changelog
8fi
9
10touch $Changelog
11
12# Print something to build output
13echo ${bldppl}"Generating changelog..."${txtrst}
14
pimpmaneaton1420dfd2019-01-16 14:00:20 -070015for i in $(seq 15);
johnnyslt0f744332015-01-12 08:10:55 -020016do
17export After_Date=`date --date="$i days ago" +%m-%d-%Y`
18k=$(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
SpiritCroc2246af82020-04-09 18:08:35 +020028 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
johnnyslt0f744332015-01-12 08:10:55 -020030 echo >> $Changelog;
31done
32
33sed -i 's/project/ */g' $Changelog
34
david769eb1f2015-02-02 08:52:14 +010035cp $Changelog $OUT/system/etc/
johnnyslt0f744332015-01-12 08:10:55 -020036cp $Changelog $OUT/
37rm $Changelog