-
Notifications
You must be signed in to change notification settings - Fork 157
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
Alternative to SNAPSHOT for non release versions #327
Comments
I achieved this a bit different. It required me adding capability to excludeSnapshot (opposite of forceSnapshot). I was trying to achieve a version that looked like major.minor.patch.buildNum when buildNum was defined (which we defined when building on Jenkins). If there is interest in adding this capability, I can provide a PR. With the excludeSnapshot option in place, I added the following to my build.gradle: //////////////////////////////////////////////////////////////////////////////////////////////////// String buildVersion(version, position, project) { scmVersion.ext.hasBuildNumber = hasProperty("BUILD_NUMBER") nextVersion { |
expect this feature in the next release ;) |
merged! |
That looks great! Thanks a lot, I'll check it out immediately. |
@tmvlpl try out latest version ;) |
While marking non release version with SNAPSHOT is great for Java libs, there are other usecases where a generated "fixed develop prerelease version" is better suited.
What about an alternative mode to the SNAPSHOT suffix, that automatically appends a semantic version prerelease marker to the upcoming version? Something like 1.2.3-dev.4, where 4 is the number of commits since the last tag. The used prerelease marker should be configurable and special care must be taken in case the current/next version already is a prerelease (like a release candidate).
I'd be happy to give the implementation a shot and provide a PR.
The text was updated successfully, but these errors were encountered: