-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchangelog.sh
executable file
·51 lines (42 loc) · 1.01 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
git_logs=$(git log `git describe --tags --abbrev=0 HEAD^`..HEAD --oneline)
git_logs_features=$(grep 'feature/' --ignore-case <<< "$git_logs")
if [ "$git_logs_features" ]
then
echo ""
echo "## Features"
while IFS= read -r line
do
echo "- $line"
done <<< "$git_logs_features"
fi
git_logs_layouts=$(grep 'layout/' --ignore-case <<< "$git_logs")
if [ "$git_logs_layouts" ]
then
echo ""
echo "## Layouts"
while IFS= read -r line
do
echo "- $line"
done <<< "$git_logs_layouts"
fi
git_logs_bugfixes=$(grep 'bugfix/' --ignore-case <<< "$git_logs")
if [ "$git_logs_bugfixes" ]
then
echo ""
echo "## Bug fixes"
while IFS= read -r line
do
echo "- $line"
done <<< "$git_logs_bugfixes"
fi
git_logs_developments=$(grep 'development/' --ignore-case <<< "$git_logs")
if [ "$git_logs_developments" ]
then
echo ""
echo "## Development"
while IFS= read -r line
do
echo "- $line"
done <<< "$git_logs_developments"
fi