Permalink
Browse files

Removed Unix functions (head and cut) so the library works on windows…

…. Replaced with string manipulation
  • Loading branch information...
1 parent 56a5cff commit 60f86121fc16dec5bfb0ec5a95f00f5fe1b62243 @simonjsmithuk simonjsmithuk committed Jan 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/app_version.rb
View
@@ -132,15 +132,15 @@ def get_revcount_from_git
end
end
- def get_revdate_from_git
+ def get_revdate_from_git
if File.exists?(".git")
- `git show --date=short --pretty=format:%cd|head -n1`.strip
+ `git show --date=short --pretty=format:%cd`.split("\n")[0].strip
end
end
def get_hash_from_git
if File.exists?(".git")
- `git show --pretty=format:%H|head -n1|cut -c 1-6`.strip
+ `git show --pretty=format:%H`.split("\n")[0].strip[0..5]
end
end
end

0 comments on commit 60f8612

Please sign in to comment.