Commit 746ae7a7 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch 'add-vendor-keyword' into '7.0.10-stable'

Add vendor directive and expose it in version manifest file

See merge request gitlab-org/omnibus!15
parents 389c0904 9f441816
......@@ -16,7 +16,7 @@
module Omnibus
class ManifestEntry
attr_reader :locked_version, :locked_source, :source_type, :described_version, :name, :license, :display_version
attr_reader :locked_version, :locked_source, :source_type, :described_version, :name, :license, :display_version, :vendor
def initialize(name, manifest_data)
@name = name
@locked_version = manifest_data[:locked_version]
......@@ -25,6 +25,7 @@ module Omnibus
@described_version = manifest_data[:described_version]
@license = manifest_data[:license]
@display_version = manifest_data[:display_version]
@vendor = manifest_data[:vendor]
end
def to_hash
......@@ -34,6 +35,7 @@ module Omnibus
source_type: @source_type,
described_version: @described_version,
display_version: @display_version,
vendor: @vendor,
license: @license,
}
end
......
......@@ -402,6 +402,26 @@ module Omnibus
end
expose :display_version
#
# Set or retrieve the {#vendor} of the software to build.
#
# @example
# vendor 'haxx'
#
# @param [String] val
# the vendor of the software to be used for vulnerability scanning
#
# @return [String]
#
def vendor(val = NULL)
if null?(val)
@vendor
else
@vendor = val
end
end
expose :vendor
#
# Set or retrieve the {#license} of the software to build.
#
......@@ -918,6 +938,7 @@ module Omnibus
described_version: version,
locked_version: Fetcher.resolve_version(version, source),
display_version: display_version,
vendor: vendor,
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