File tree Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Expand file tree Collapse file tree 2 files changed +2
-36
lines changed Original file line number Diff line number Diff line change 11
22#### [ Current]
3+ * [ a7200f0] ( a7200f0 ) #11 Fix bug Current commits is not seen on log file __ (Murat Kemal BAYGÜN)__
34 * [ 6385fff] ( 6385fff ) #8 Change executable file name to katip __ (Murat Kemal BAYGÜN)__
45
56#### 0.2.0
Original file line number Diff line number Diff line change 33module Katip
44 require 'katip/railtie' if defined? ( Rails )
55
6- @@katip = <<-SHELL
7- # Get tags as an array
8- TAGS_ARRAY=(`git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | grep -v '^$'`)
9-
10- repo_url="../../commit/"
11-
12- # Set User defined file if exist else use default
13- if [ -n "$1" ]; then
14- OUTPUT=$1
15- else
16- OUTPUT="CHANGELOG.md"
17- fi
18-
19- # Calculate the tag count
20- SIZE=${#TAGS_ARRAY[@]}
21-
22- echo "\n #### [Current]" > $OUTPUT
23-
24- # Iterate reversly on tags
25- for (( i = SIZE - 1; i >= 0 ; i-- ));
26- do
27- CURR_TAG=${TAGS_ARRAY[$i]}
28- echo "" >> $OUTPUT
29- if [ $PREV_TAG ];then
30- echo "#### [$PREV_TAG]" >> $OUTPUT
31- fi
32- git log --pretty=format:" * [%h]($repo_url%h) %s __(%an)__" $CURR_TAG..$PREV_TAG | grep -v "Merge branch " >> $OUTPUT
33- PREV_TAG=$CURR_TAG
34- done
35-
36- # Dump change log for first tag
37- FIRST=$(git tag -l | head -1)
38- echo "\n #### [$FIRST]" >> $OUTPUT
39-
40- git log --pretty=format:" * [%h]($repo_url%h) %s __(%an)__" $FIRST | grep -v "Merge branch " >> $OUTPUT
41- SHELL
6+ @@katip = `katip`
427
438 def self . set ( param )
449 @@katip = param
You can’t perform that action at this time.
0 commit comments