Merge pull request #12302 from carlocab/TZ

build: set TZ=UTC0
This commit is contained in:
Carlo Cabrera 2021-10-22 20:26:13 +08:00 committed by GitHub
commit 5ffe1a3abc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,13 +131,16 @@ class Build
keep_tmp: args.keep_tmp?, keep_tmp: args.keep_tmp?,
interactive: args.interactive?, interactive: args.interactive?,
) do ) do
with_env(
# For head builds, HOMEBREW_FORMULA_PREFIX should include the commit, # For head builds, HOMEBREW_FORMULA_PREFIX should include the commit,
# which is not known until after the formula has been staged. # which is not known until after the formula has been staged.
ENV["HOMEBREW_FORMULA_PREFIX"] = formula.prefix HOMEBREW_FORMULA_PREFIX: formula.prefix,
# https://reproducible-builds.org/docs/source-date-epoch/ # https://reproducible-builds.org/docs/source-date-epoch/
ENV["SOURCE_DATE_EPOCH"] = formula.source_modified_time.to_i.to_s SOURCE_DATE_EPOCH: formula.source_modified_time.to_i.to_s,
# Avoid make getting confused about timestamps.
# https://github.com/Homebrew/homebrew-core/pull/87470
TZ: "UTC0",
) do
formula.patch formula.patch
if args.git? if args.git?
@ -179,6 +182,7 @@ class Build
end end
end end
end end
end
def detect_stdlibs def detect_stdlibs
keg = Keg.new(formula.prefix) keg = Keg.new(formula.prefix)