1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-16 19:45:33 -04:00

freeze build timestamp via an environment variable

This commit is contained in:
2022-03-18 17:41:27 -04:00
parent 5912cd1356
commit f870c5c796
6 changed files with 20 additions and 6 deletions

View File

@@ -1,2 +1,5 @@
// Next.js constants (not needed in frontend)
export const NOTES_DIR = "./notes";
// normalize the timestamp saved when building/deploying (see next.config.js) and fall back to right now:
export const RELEASE_DATE = new Date(process.env.RELEASE_DATE ?? Date.now()).toISOString();