Commit ba1b25b93c0e69312b1c720ee4149d7dbc3d4f7a
1 parent
fa03a6b3
Exists in
master
and in
27 other branches
Noosfero::VERSION: use git data when available
For code in development, this produces version numbers like "1.0-119-g124a746", which is useful when running from git. Those running Noosfero forks can even make their own tags and get version numbers like "1.0+vendor1".
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
lib/noosfero/version.rb
@@ -2,3 +2,7 @@ module Noosfero | @@ -2,3 +2,7 @@ module Noosfero | ||
2 | PROJECT = 'noosfero' | 2 | PROJECT = 'noosfero' |
3 | VERSION = '1.0' | 3 | VERSION = '1.0' |
4 | end | 4 | end |
5 | + | ||
6 | +if File.exist?(File.join(Rails.root, '.git')) | ||
7 | + Noosfero::VERSION.clear << Dir.chdir(Rails.root) { `git describe --tags`.strip } | ||
8 | +end |