File: reproducible-build.patch

package info (click to toggle)
requirejs 2.3.8%2Bds%2B~2.1.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,236 kB
  • sloc: javascript: 80,855; sh: 64; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (3)
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: 2020-11-27

--- a/copydist.js
+++ b/copydist.js
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
 var fs = require('fs'),
-    stamp = (new Date()).toUTCString(),
+    stamp = (new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).toUTCString(),
     exec = require('child_process').exec,
     distFileName = 'dist/r.js',
     count = 0,