Skip to content

Commit

Permalink
#9 Update rake job to use installed executable
Browse files Browse the repository at this point in the history
  • Loading branch information
baygunm committed Jul 19, 2013
1 parent a7200f0 commit f30a3b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#### [Current]
* [a7200f0](a7200f0) #11 Fix bug Current commits is not seen on log file __(Murat Kemal BAYGÜN)__
* [6385fff](6385fff) #8 Change executable file name to katip __(Murat Kemal BAYGÜN)__

#### 0.2.0
Expand Down
37 changes: 1 addition & 36 deletions lib/katip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,7 @@
module Katip
require 'katip/railtie' if defined?(Rails)

@@katip = <<-SHELL
# Get tags as an array
TAGS_ARRAY=(`git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | grep -v '^$'`)
repo_url="../../commit/"
# Set User defined file if exist else use default
if [ -n "$1" ]; then
OUTPUT=$1
else
OUTPUT="CHANGELOG.md"
fi
# Calculate the tag count
SIZE=${#TAGS_ARRAY[@]}
echo "\n#### [Current]" > $OUTPUT
# Iterate reversly on tags
for (( i = SIZE - 1; i >= 0 ; i-- ));
do
CURR_TAG=${TAGS_ARRAY[$i]}
echo "" >> $OUTPUT
if [ $PREV_TAG ];then
echo "#### [$PREV_TAG]" >> $OUTPUT
fi
git log --pretty=format:" * [%h]($repo_url%h) %s __(%an)__" $CURR_TAG..$PREV_TAG | grep -v "Merge branch " >> $OUTPUT
PREV_TAG=$CURR_TAG
done
# Dump change log for first tag
FIRST=$(git tag -l | head -1)
echo "\n#### [$FIRST]" >> $OUTPUT
git log --pretty=format:" * [%h]($repo_url%h) %s __(%an)__" $FIRST | grep -v "Merge branch " >> $OUTPUT
SHELL
@@katip = `katip`

def self.set(param)
@@katip = param
Expand Down

0 comments on commit f30a3b2

Please sign in to comment.