-
Notifications
You must be signed in to change notification settings - Fork 177
Publish Dated SNAPSHOTs #2591
base: master-deprecated
Are you sure you want to change the base?
Publish Dated SNAPSHOTs #2591
Conversation
if (doDatedSnapshot.isDefined) { | ||
val basicFormat = java.time.format.DateTimeFormatter.BASIC_ISO_DATE | ||
val date = java.time.LocalDate.now().format(basicFormat) | ||
s"$major-$date-SNAPSHOT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be a lot better if the date were derived from the commit hash so that we don't have old commits pushing over today's date. I also think the BuildInfo should include the commit hash so that users can check this info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use git describe --tag
or some variation of this to get <latest-tag>-<new-commits>-g<git-hash>
instead of the date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we include the commit hash, it will publish a SNAPSHOT for every commit whereas I was trying to just have 1 per day. To keep the number of snapshots down we could instead put it on a "nightly" trigger, but that makes downstream projects more annoying to do because you want to make sure they publish their nightly SNAPSHOT after and upstream dependencies do. Just sticking with a dated one makes that a little bit simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every commit can be useful as you are known to be pinned to something obvious. Nightly is annoying because it's a question of when (have to check the cron job to see when nightly is defined). FWIW: here are the commit hash snapshots for sifive/chisel-circt
: https://oss.sonatype.org/content/repositories/snapshots/com/sifive/chisel-circt_2.13/ This has been useful in the past.
The intent is that once these are being published, chisel3 can find the latest dated SNAPSHOT and then publish itself against it.
Contributor Checklist
Type of Improvement
API Impact
No impact
Backend Code Generation Impact
No impact
Desired Merge Strategy
Release Notes
Begin published dated SNAPSHOTs
Reviewer Checklist (only modified by reviewer)
Please Merge
?