1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Forwarded: not-needed
Last-Update: 2019-03-12
--- a/build/configs.js
+++ b/build/configs.js
@@ -5,9 +5,10 @@
const node = require('@rollup/plugin-node-resolve').nodeResolve
const replace = require('rollup-plugin-replace')
const version = process.env.VERSION || require('../package.json').version
+const now = new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime());
const banner = `/*!
* vue-router v${version}
- * (c) ${new Date().getFullYear()} Evan You
+ * (c) ${now.getFullYear()} Evan You
* @license MIT
*/`
|