gradle-release
gradle-release copied to clipboard
Provide ability to skip the step of committing SNAPSHOT version to master
I am using the gradle release plugin, I see that when we run gradle release when everything works we have 2 commits to our repo's master branch,
- Changes the previous SNAPSHOT version to a new release version in the gradle.properties file
- Changes the new release version to a newer snapshot version in the gradle.properties file
I would like to skip the second step. But I did not find any way to do it in the documentation mentioned in https://github.com/researchgate/gradle-release
Am I missing something? Is there a way to skip committing the snapshot version? If yes how do I do it? The command I am using to do it:
gradle release \ -Prelease.useAutomaticVersion=true \ -Prelease.releaseVersion=$(echo $(git tag) | awk -F. '{print $1 "." $2 "." $3+1}') \ -Prelease.newVersion=$(echo $(echo $(git tag) | awk -F. '{print $1 "." $2 "." $3+1}') | awk -F. '{print $1 "." $2 "." $3+1 "-SNAPSHOT"}') \ -PfailOnCommitNeeded=false \ -PfailOnPublishNeeded=false
TIA!
If that is not already supported I think it is a good feature to add.
have you tried setting next version to be the same to see if it skips step 2? e.g.
gradle release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=1.0.1 -Prelease.newVersion=1.0.1
Nope, I haven't tried that. Will try and get back with you. Even if that works, I think that would be a sloppy workaround. :)
Vydruth, Have you tried this ? Looking for a similar option to skip the snapshot version update on master.