mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Intelligent version numbering in the gem generator
(cherry picked from commit fed82c4903ee1869ff801c678b8468736ffbe8c3)
This commit is contained in:
parent
a21b39f9f7
commit
6fb65843b2
@ -19,9 +19,22 @@
|
||||
require 'fileutils'
|
||||
require 'tmpdir'
|
||||
|
||||
VERSION = "5.4.2"
|
||||
|
||||
def version
|
||||
v = VERSION
|
||||
|
||||
_, min, incr = v.split(".").collect{|e| e.to_i}
|
||||
|
||||
if min >= 80 || incr >= 80
|
||||
v += ".pre"
|
||||
end
|
||||
|
||||
v
|
||||
end
|
||||
|
||||
DEFAULTS={
|
||||
:version => "5.5.80",
|
||||
:version => version,
|
||||
:date => Time.now.strftime("%Y-%m-%d"),
|
||||
:dependencies => []
|
||||
}
|
||||
@ -211,7 +224,7 @@ def generate_gem(description)
|
||||
end
|
||||
|
||||
Dir.glob("*.gem").each do |f|
|
||||
FileUtils.cp(f, pwd)
|
||||
FileUtils.cp(f, pwd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user