Applying semver.stage=snapshot
between release condidates
#91
-
Hi, there, Thank you for the plugin and the work. I'm a bit unsatisfied by the state of other plugins, I have been using some for years, but I like the simpleness of yours. I have one question about a behavior I'm not sure is currently possible. I making a library that is in the release candidate stage, but in-between the RCs I'd like to publish snapshots, because OSSRH repo for snapshots, expects versions to end with Currently the git graph looks like, version gitGraph
commit
commit id: "fix(osgi): Remove split package to fix OSGI ClassLoading error" tag: "v0.0.1-rc.3"
commit
commit id: "around 50 commits"
commit
commit id: "last commit" type: HIGHLIGHT
But the command $ ./gradlew -Psemver.stage=snapshot printSemver
Type-safe project accessors is an incubating feature.
> Task :printSemver
semver for fireplace: 0.1.1-SNAPSHOT I expected it to be |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
Maybe out of scope there, I can create issue if needed. I struggled a bit to make the plugins {
id("com.javiersc.semver.gradle.plugin") version "0.3.0-alpha.5"
}
semver {
tagPrefix.set("v")
} So the output was on a clean repo $ ./gradlew -Psemver.stage=snapshot printSemver
Type-safe project accessors is an incubating feature.
> Task :printSemver
semver for fireplace: v0.0.1-rc.3.54+e333201 While debugging the plugin I found the reason is related to whether tag prefixes are equal This makes me wonder how to use properly in a multi-project where all sub-projects have the same version. Am I using this properly ? That reminds I have some logic whether the version is a snapshot or a releasable artefact ; this could be useful if the plugin exposed some properties like |
Beta Was this translation helpful? Give feedback.
-
Hi @bric3! I think I set the default version to
Tools like Dependabot, Renovate, third-party plugins like Ben Manes one, or a future Gradle official plugin allow updating libraries automatically respecting those rules. So supposing you are publishing the version I could add a flag to toggle this behavior, but I would like to know your opinion about the mentioned problem before adding it. |
Beta Was this translation helpful? Give feedback.
-
As @bric3 mentioned this behavior changed on 7.0+ and it is fixed for the Semver plugin here #92
|
Beta Was this translation helpful? Give feedback.
As @bric3 mentioned this behavior changed on 7.0+ and it is fixed for the Semver plugin here #92