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
Merged

Conversation

lamby
Copy link
Contributor

@lamby lamby 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

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
rollup.config.js Outdated
@@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@lamby
Copy link
Contributor Author

lamby commented Mar 5, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants