diff --git a/lib/noosfero/version.rb b/lib/noosfero/version.rb index e1ae838..eac128b 100644 --- a/lib/noosfero/version.rb +++ b/lib/noosfero/version.rb @@ -4,7 +4,7 @@ module Noosfero end root = File.expand_path(File.dirname(__FILE__) + '/../..') -if File.exist?(File.join(root, '.git')) +if File.exist?(File.join(root, '.git')) && system('which git >/dev/null') git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') } if git_version > Noosfero::VERSION Noosfero::VERSION.clear << git_version -- libgit2 0.21.2