diff --git a/lib/chili_project/version.rb b/lib/chili_project/version.rb index 5aee2bed..601449ea 100644 --- a/lib/chili_project/version.rb +++ b/lib/chili_project/version.rb @@ -38,12 +38,7 @@ module ChiliProject end def self.revision - revision = `git rev-parse HEAD` - if revision.present? - revision.strip[0..8] - else - nil - end + `git --git-dir="#{Rails.root.join('.git')}" rev-parse --short=9 HEAD`.chomp if File.directory? Rails.root.join('.git') end REVISION = self.revision