Unverified Commit 6f385032 authored by Balasankar "Balu" C's avatar Balasankar "Balu" C
Browse files

Add display_version directive and expose it in version manifest file


Signed-off-by: Balasankar C's avatarBalasankar "Balu" C <balasankarc@autistici.org>
parent be8ac0f4
......@@ -16,7 +16,7 @@
module Omnibus
class ManifestEntry
attr_reader :locked_version, :locked_source, :source_type, :described_version, :name, :license
attr_reader :locked_version, :locked_source, :source_type, :described_version, :name, :license, :display_version
def initialize(name, manifest_data)
@name = name
@locked_version = manifest_data[:locked_version]
......@@ -24,6 +24,7 @@ module Omnibus
@source_type = manifest_data[:source_type]
@described_version = manifest_data[:described_version]
@license = manifest_data[:license]
@display_version = manifest_data[:display_version]
end
def to_hash
......@@ -32,6 +33,7 @@ module Omnibus
locked_source: @locked_source,
source_type: @source_type,
described_version: @described_version,
display_version: @display_version,
license: @license,
}
end
......
......@@ -381,6 +381,27 @@ module Omnibus
end
expose :default_version
#
# Set or retrieve the {#display_version} of the software to build.
# If not provided, we use @version
#
# @example
# display_version '1.2.3'
#
# @param [String] val
# the version to be printed to version manifest file.
#
# @return [String]
#
def display_version(val = NULL)
if null?(val)
@display_version ||= @version
else
@display_version = val
end
end
expose :display_version
#
# Set or retrieve the {#license} of the software to build.
#
......@@ -896,6 +917,7 @@ module Omnibus
source_type: source_type,
described_version: version,
locked_version: Fetcher.resolve_version(version, source),
display_version: display_version,
locked_source: source,
license: license,
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment