Merge pull request #233 from JojoBoulix/Honour-SOURCE_DATE_EPOCH

Honour the SOURCE_DATE_EPOCH environment variable
This commit is contained in:
Steve J Donovan 2016-06-19 11:11:40 +02:00 committed by GitHub
commit 9cd29253cb
1 changed files with 7 additions and 3 deletions

View File

@ -806,10 +806,14 @@ ldoc.title = ldoc.title or args.title
ldoc.project = ldoc.project or args.project
ldoc.package = args.package:match '%a+' and args.package or nil
if args.date == 'system' then
ldoc.updatetime = os.date("%Y-%m-%d %H:%M:%S")
if os.getenv("SOURCE_DATE_EPOCH") == nil then
if args.date == 'system' then
ldoc.updatetime = os.date("%Y-%m-%d %H:%M:%S")
else
ldoc.updatetime = args.date
end
else
ldoc.updatetime = args.date
ldoc.updatetime = os.date("!%Y-%m-%d %H:%M:%S",os.getenv("SOURCE_DATE_EPOCH"))
end
local html = require 'ldoc.html'