Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the build reproducible #2024

Merged
merged 2 commits into from Mar 5, 2018

Conversation

Projects
None yet
2 participants
@lamby
Copy link
Contributor

commented Mar 2, 2018

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

Mkae the build reproducible
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>

@lamby lamby changed the title Mkae the build reproducible Make the build reproducible Mar 2, 2018

@@ -15,9 +15,11 @@ const commitHash = (function () {
}
})();

const now = new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime()).getTime();

This comment has been minimized.

Copy link
@lukastaegert

lukastaegert Mar 2, 2018

Member

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?

This comment has been minimized.

Copy link
@lamby

lamby Mar 2, 2018

Author Contributor

I'm easy! :) (indeed, see the linked Debian bug for a patch for the previous version)

This comment has been minimized.

Copy link
@lukastaegert

lukastaegert Mar 2, 2018

Member

Ah, I see! I guess I would go with the original suggestion then.

@lukastaegert lukastaegert added this to the 0.56.4 milestone Mar 2, 2018

@lukastaegert lukastaegert merged commit eb272d1 into rollup:master Mar 5, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lamby

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.