forked from Qikfix/sos_analyze
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_changelog.sh
executable file
·25 lines (21 loc) · 964 Bytes
/
build_changelog.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
CHANGE="changelog.log"
> $CHANGE
echo "General Info" | tee -a $CHANGE
echo "---" | tee -a $CHANGE
git log --oneline | awk '{print $2}' | grep "\[" | sort | uniq -c | sort -nr | tee -a $CHANGE
echo "---" | tee -a $CHANGE
echo | tee -a $CHANGE
echo | tee -a $CHANGE
for b in $(git log --oneline | awk '{print $2}' | grep "\[" | sort | uniq -c | sort -nr | awk '{print $2}')
do
echo - $b | tee -a $CHANGE
parsed=$(echo $b | sed -e 's/\[/\\[/g' | sed -e 's/\]/\\]/g')
for x in $(git log --oneline | grep "$parsed" | awk '{print $1}')
do
comm_info=$(git log -1 --pretty="%cd | %s" $x)
echo " - $comm_info" | tee -a $CHANGE
done
echo | tee -a $CHANGE
echo | tee -a $CHANGE
done