From f30a3b2b8b9575049be3cb5140253e5c4887e177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Kemal=20BAYG=C3=9CN?= Date: Fri, 19 Jul 2013 15:08:04 +0300 Subject: [PATCH] #9 Update rake job to use installed executable --- CHANGELOG.md | 1 + lib/katip.rb | 37 +------------------------------------ 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7412c6..5509bae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/katip.rb b/lib/katip.rb index 8d8137a..e3eb23a 100644 --- a/lib/katip.rb +++ b/lib/katip.rb @@ -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