From 3c4d2c8d165a12d08fd959fa6488536ce68489ec Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 3 Nov 2015 19:57:08 -0200 Subject: [PATCH] Noosfero::VERSION: completely skip git usage if git is not installed --- lib/noosfero/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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