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

nebula.release should not enforce precedence for immutable snapshots #200

Merged
merged 1 commit into from Sep 23, 2020

Conversation

rpalcolea
Copy link
Member

This fixes #199
We found that

git.tag.add(name: 'v3.1.2')
git.tag.add(name: 'v3.2.0-rc.1')
git.tag.add(name: 'v3.2.0-rc.2')

when:
def version =  inferredVersionForTask('devSnapshot', '-Prelease.scope=patch')

then:
version == dev('3.1.3-dev.0+') 

However, doing this with immutable snapshots:

replaceDevWithImmutableSnapshot()
git.tag.add(name: 'v3.1.2')
git.tag.add(name: 'v3.2.0-rc.1')
git.tag.add(name: 'v3.2.0-rc.2')

when:
def version =  inferredVersionForTask('devSnapshot', '-Prelease.scope=patch')

then:
version.toString().startsWith("3.1.3-snapshot." + getUtcDateForComparison()) 

results in exceptions such as

11:49:17 Caused by: org.gradle.api.GradleException: Based on previous tags in this branch the nearest version is 70.4.0-rc.15 You're attempting to release 70.3.1-snapshot.202009231549+pull.545.9c0f663 based on the tag recently pushed. Please look at https://github.com/nebula-plugins/nebula-release-plugin/wiki/Error-Messages-Explained#orggradleapigradleexception-inferred-version-cannot-be-lower-than-nearest-required-by-selected-strategy 

We should have the same behavior as in dev suffix

@coveralls
Copy link

Coverage Status

Coverage remained the same at 59.608% when pulling f80090c on immutable-snapshot-precedence-enhancement into 188c36d on master.

@OdysseusLives
Copy link
Member

Nice change!

@rpalcolea rpalcolea merged commit 8e6c4c9 into master Sep 23, 2020
@rpalcolea rpalcolea deleted the immutable-snapshot-precedence-enhancement branch September 23, 2020 19:52
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.

nebula.release should not enforce precedence for immutable snapshots
3 participants