Skip to content

Commit f30a3b2

Browse files
committed
#9 Update rake job to use installed executable
1 parent a7200f0 commit f30a3b2

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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

lib/katip.rb

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,7 @@
33
module 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

0 commit comments

Comments
 (0)