mirror of https://gitee.com/openkylin/npm.git
Use source-date-epoch as timestamp source for documentation
Origin: https://salsa.debian.org/js-team/npm/-/merge_requests/7 Forwarded: no Reviewed-By: Yadd <yadd@debian.org> Last-Update: 2021-11-27 Gbp-Pq: Name 2020_reproducible_documentation_build.patch
This commit is contained in:
parent
42ebd1aa31
commit
940667d852
|
@ -36,7 +36,8 @@ fs.readFile(src, 'utf8', function (err, data) {
|
||||||
.replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer)
|
.replace(/\[([^\]]+)\]\(\/using-npm\/([^)]+)\)/g, replacer)
|
||||||
.trim()
|
.trim()
|
||||||
|
|
||||||
fs.writeFile(dest, marked(result), 'utf8', function (err) {
|
var date = new Date(process.env.SOURCE_DATE_EPOCH)
|
||||||
|
fs.writeFile(dest, marked(result, {date}), 'utf8', function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return console.log(err)
|
return console.log(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue