Commit a15645d86469bf2e2c597ad3892682962cfbac6b
1 parent
56191f37
Exists in
master
and in
29 other branches
Noosfero::VERSION: use only newer git versions
Don't use versions from git if they are older than the one hardcoded. This is specially useful when doing releases, and mostly harmless everywhere else.
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
lib/noosfero/version.rb
... | ... | @@ -5,5 +5,8 @@ end |
5 | 5 | |
6 | 6 | root = File.expand_path(File.dirname(__FILE__) + '/../..') |
7 | 7 | if File.exist?(File.join(root, '.git')) |
8 | - Noosfero::VERSION.clear << Dir.chdir(root) { `git describe --tags`.strip.sub('-rc', '~rc') } | |
8 | + git_version = Dir.chdir(root) { `git describe --tags`.strip.sub('-rc', '~rc') } | |
9 | + if git_version > Noosfero::VERSION | |
10 | + Noosfero::VERSION.clear << git_version | |
11 | + end | |
9 | 12 | end | ... | ... |