Commit 5ebd5e2c3f45a5f6aaa8dd26fafc52462d6c51c0
Exists in
master
and in
11 other branches
Merge remote-tracking branch 'origin/master' into rails4
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/version.rb
@@ -4,7 +4,7 @@ module Noosfero | @@ -4,7 +4,7 @@ module Noosfero | ||
4 | end | 4 | end |
5 | 5 | ||
6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') | 6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') |
7 | -if File.exist?(File.join(root, '.git')) | 7 | +if File.exist?(File.join(root, '.git')) && system('which git >/dev/null') |
8 | git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') } | 8 | git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') } |
9 | if git_version > Noosfero::VERSION | 9 | if git_version > Noosfero::VERSION |
10 | Noosfero::VERSION.clear << git_version | 10 | Noosfero::VERSION.clear << git_version |