Skip to content

Make the build reproducible - #2024

Merged
lukastaegert merged 2 commits into
rollup:masterfrom
lamby:reproducible-build
Mar 5, 2018
Merged

Make the build reproducible#2024
lukastaegert merged 2 commits into
rollup:masterfrom
lamby:reproducible-build

Conversation

@lamby

@lamby lamby commented Mar 2, 2018

Copy link
Copy Markdown
Contributor

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
Comment thread rollup.config.js Outdated
}
})();

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

lamby commented Mar 5, 2018

Copy link
Copy Markdown
Contributor Author

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.

2 participants