Created
August 10, 2012 09:57
-
-
Save ceicke/3313112 to your computer and use it in GitHub Desktop.
Get some code line vs. test code metrics for each tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
counter=0 | |
for tag in `git for-each-ref --sort=taggerdate --format='%(refname:short)' refs/tags` | |
do | |
echo $tag | |
git checkout $tag | |
code_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./app/**/* | wc -l` | |
test_line_count=`grep -vR '^\s*$\|^\s*#.*$' ./features/**/* | wc -l` | |
date=`git show --quiet refs/tags/$tag --format='%ad' | grep +` | |
Tagarray[$counter]="$tag;$date;$code_line_count;$test_line_count" | |
counter=$counter+1 | |
done | |
printf "%s\n" "${Tagarray[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment