Commit 3c4d2c8d165a12d08fd959fa6488536ce68489ec

Authored by Antonio Terceiro
1 parent bad18a79

Noosfero::VERSION: completely skip git usage if git is not installed

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/version.rb
... ... @@ -4,7 +4,7 @@ module Noosfero
4 4 end
5 5  
6 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 8 git_version = Dir.chdir(root) { `git describe --tags`.to_s.strip.sub('-rc', '~rc') }
9 9 if git_version > Noosfero::VERSION
10 10 Noosfero::VERSION.clear << git_version
... ...