summarylogtreecommitdiffstats
path: root/expire-from-source-date-epoch.patch
blob: 597692654bbb5d73b1bf2c0b39d6925b8e91d075 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/ts/scripts/get-expire-time.ts
+++ b/ts/scripts/get-expire-time.ts
@@ -8,7 +8,7 @@ import { writeFileSync } from 'fs';
 import { DAY } from '../util/durations';
 
 const unixTimestamp = parseInt(
-  execSync('git show -s --format=%ct').toString('utf8'),
+  process.env.SOURCE_DATE_EPOCH || execSync('git show -s --format=%ct').toString('utf8'),
   10
 );
 const buildCreation = unixTimestamp * 1000;