File: reproducible.patch

package info (click to toggle)
node-axios 1.2.1%2Bdfsg-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,796 kB
  • sloc: javascript: 10,727; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: make build reproducible
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-10-09

--- a/rollup.config.js
+++ b/rollup.config.js
@@ -54,7 +54,7 @@
 };
 
 export default async () => {
-  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 = `// Axios v${lib.version} Copyright (c) ${year} ${lib.author} and contributors`;
 
   return [