Make the build reproducible - #2024
Merged
Merged
Conversation
Whilst working on the Reproducible Builds effort [0], we noticed that node-rollup could not be built reproducibly as it encodes the current build time via "new Date()". This was originally filed in Debian as #891899. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/891899 Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
lukastaegert
reviewed
Mar 2, 2018
| } | ||
| })(); | ||
|
|
||
| const now = new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime()).getTime(); |
Member
There was a problem hiding this comment.
The previous version would put a human readable date into the banner. Would it be ok with your efforts to remove the final getTime() here? Or maybe use toISOString instead to get a more standardised output?
Contributor
Author
There was a problem hiding this comment.
I'm easy! :) (indeed, see the linked Debian bug for a patch for the previous version)
Member
There was a problem hiding this comment.
Ah, I see! I guess I would go with the original suggestion then.
lukastaegert
approved these changes
Mar 2, 2018
Contributor
Author
|
Thanks! |
This was referenced Mar 15, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whilst working on the Reproducible Builds effort [0], we noticed
that node-rollup could not be built reproducibly as it encodes
the current build time via "new Date()".
This was originally filed in Debian as #891899.
[0] https://reproducible-builds.org/
[1] https://bugs.debian.org/891899
Signed-off-by: Chris Lamb chris@chris-lamb.co.uk