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

Fix #6092 - sbt 1.4.0~1.4.3 - all the files in the packaged jar files created at epoch millisecond 0 (1970-01-01 00:00:00) #6093

Closed
wants to merge 1 commit into from
Closed

Fix #6092 - sbt 1.4.0~1.4.3 - all the files in the packaged jar files created at epoch millisecond 0 (1970-01-01 00:00:00) #6093

wants to merge 1 commit into from

Conversation

kevin-lee
Copy link
Contributor

Fix #6092 - sbt 1.4.0~1.4.3 - all the files in the packaged jar files created at epoch millisecond 0 (1970-01-01 00:00:00)

Before
Screen Shot 2020-11-16 at 6 27 25 pm

After
Screen Shot 2020-11-16 at 6 30 14 pm

… created at epoch millisecond 0 (1970-01-01 00:00:00)
sys.env.get("SOURCE_DATE_EPOCH").map(_.toLong * 1000).orElse(Some(0L))
sys.env.get("SOURCE_DATE_EPOCH").map(_.toLong * 1000)
Copy link
Member

Choose a reason for hiding this comment

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

Zeroing out the JAR was done so intentionally in #5344 to make the packaging more reproducible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah... Alright I should need to read to understand it but I have a very quick question.
Should it be 0L or any fixed epoch milliseconds? If it's latter one, can it be Some(System.currentTimeMillis())?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I got it. I will use sbt 1.3.13 or use SOURCE_DATE_EPOCH env var if the timestamp of the class file is important. Thanks!

@kevin-lee kevin-lee closed this Nov 16, 2020
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.

sbt 1.4.0~1.4.3 - all the files in the packaged jar files created at epoch millisecond 0 (1970-01-01 00:00:00)
2 participants