github_packages: adjust rebuild handling
This commit is contained in:
parent
4f57adf42f
commit
95b44eab49
@ -68,10 +68,18 @@ class GitHubPackages
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.version_rebuild(version, rebuild)
|
def self.version_rebuild(version, rebuild, bottle_tag = nil)
|
||||||
return version.to_s unless rebuild.to_i.positive?
|
bottle_tag = (".#{bottle_tag}" if bottle_tag.present?)
|
||||||
|
|
||||||
"#{version}.#{rebuild}"
|
rebuild = if rebuild.to_i.positive?
|
||||||
|
if bottle_tag
|
||||||
|
".#{rebuild}"
|
||||||
|
else
|
||||||
|
"-#{rebuild}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
"#{version}#{bottle_tag}#{rebuild}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.repo_without_prefix(repo)
|
def self.repo_without_prefix(repo)
|
||||||
@ -222,8 +230,7 @@ class GitHubPackages
|
|||||||
formulae_dir = tag_hash["formulae_brew_sh_path"]
|
formulae_dir = tag_hash["formulae_brew_sh_path"]
|
||||||
documentation = "https://formulae.brew.sh/#{formulae_dir}/#{formula_name}" if formula_core_tap
|
documentation = "https://formulae.brew.sh/#{formulae_dir}/#{formula_name}" if formula_core_tap
|
||||||
|
|
||||||
rebuild = ".#{rebuild}" if rebuild.to_i.positive?
|
tag = GitHubPackages.version_rebuild(version, rebuild, bottle_tag)
|
||||||
tag = "#{version}.#{bottle_tag}#{rebuild}"
|
|
||||||
|
|
||||||
annotations_hash = formula_annotations_hash.merge({
|
annotations_hash = formula_annotations_hash.merge({
|
||||||
"org.opencontainers.image.created" => created_date,
|
"org.opencontainers.image.created" => created_date,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user