File: reproducible_build.patch

package info (click to toggle)
node-dommatrix 1.0.3%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 956 kB
  • sloc: javascript: 1,233; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2022-06-10

--- a/rollup.config.js
+++ b/rollup.config.js
@@ -10,7 +10,7 @@
 const INPUT = process.env.INPUTFILE;
 const OUTPUTC = process.env.OUTPUTFILE;
 
-const year = (new Date()).getFullYear();
+const year = (new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear();
 
 const banner = `/*!
 * DOMMatrix v${pkg.version} (${pkg.homepage})