diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 2a9759adeb..794fc9627f 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -538,6 +538,7 @@ module Homebrew "prefix" => bottle.prefix, "cellar" => bottle.cellar.to_s, "rebuild" => bottle.rebuild, + "date" => Time.now.strftime("%F"), "tags" => { bottle_tag.to_s => { "filename" => filename.bintray, diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index ed70334058..f397d3b77a 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -177,8 +177,9 @@ class GitHubPackages remote end + created_date = bottle_hash["bottle"]["date"] formula_annotations_hash = { - "org.opencontainers.image.created" => Time.now.strftime("%F"), + "org.opencontainers.image.created" => created_date, "org.opencontainers.image.description" => bottle_hash["formula"]["desc"], "org.opencontainers.image.documentation" => documentation, "org.opencontainers.image.license" => bottle_hash["formula"]["license"], @@ -225,7 +226,7 @@ class GitHubPackages tag = "#{version}.#{bottle_tag}#{rebuild}" annotations_hash = formula_annotations_hash.merge({ - "org.opencontainers.image.created" => Time.at(tag_hash["tab"]["source_modified_time"]).strftime("%F"), + "org.opencontainers.image.created" => created_date, "org.opencontainers.image.documentation" => documentation, "org.opencontainers.image.ref.name" => tag, "org.opencontainers.image.title" => "#{formula_full_name} #{tag}",