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
Introduce ImmutableSnapshot strategy to create snapshots using timestamps #153
Conversation
if I have |
@rspieldenner , this is actually a good question. This new immutable snapshot suggests to use the snapshot explicitly instead of relying on things like I think this should be considered as a breaking change in order to unify versioning with other technologies that are Semver based, like NPM. I believe snapshots should be always consumed explicitly and not via dynamic versions ( Also, I think is worth mentioning that generating a snapshot from a branch where latest tag is a RC one, ends up in something like this: |
|
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.
Implementation looks good
src/integTest/groovy/nebula/plugin/release/ReleasePluginIntegrationSpec.groovy
Show resolved
Hide resolved
src/integTest/groovy/nebula/plugin/release/ReleasePluginIntegrationSpec.groovy
Outdated
Show resolved
Hide resolved
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.
Adding a request to codify the earlier question & discussion around if I have 1.2.3-snapshot.2019070511000000+abcdef and 1.2.3-rc.1 which will I get if I ask for 1.+
... with a test to showcase the different semver ordering when using devSnapshot
vs immutableSnapshot
…rns do not fail builds with immutablesnapshot
Hi @OdysseusLives , let me know if 471dbd4 makes sense to you |
Hey @OdysseusLives , based on our conversations and our findings in gradle/gradle#9915 I believe this change is good to go, thoughts? |
This introduces
immutableSnapshot
task/strategy to generate snapshot versions that are meant to be immutable and should be unique via UTC timestamp. Ex.1.2.0-snapshot.20190705210556893+abcdef
Pattern is
<major>.<minor>.<patch>-snapshot.<timestamp>+<hash>
and timestamp format isYYYYMMddHHmmssSSS
This change doesn't replace
devSnapshot
and default strategy to prevent breaking changes for consumers.We should be able to override the default strategy from
devSnapshot
toimmutableSnapshot
viaReleasePluginExtension
: