Skip to content

Commit

Permalink
base: loading: support fake mtime with SOURCE_DATE_EPCOCH
Browse files Browse the repository at this point in the history
Do this when loading libraries
  • Loading branch information
nixo committed Feb 13, 2020
1 parent b0c33b0 commit b9c1c1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ function _include_dependency(mod::Module, _path::AbstractString)
path = normpath(joinpath(dirname(prev), _path))
end
if _track_dependencies[]
push!(_require_dependencies, (mod, path, mtime(path)))
push!(_require_dependencies,
(mod, path,
haskey(ENV, "SOURCE_DATE_EPOCH") ?
parse(Float64, ENV["SOURCE_DATE_EPOCH"]) : mtime(path)))
end
return path, prev
end
Expand Down

0 comments on commit b9c1c1d

Please sign in to comment.