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

Provide ability to skip the step of committing SNAPSHOT version to master #343

Open
Vydruth opened this issue Oct 22, 2020 · 5 comments
Open

Comments

@Vydruth
Copy link

Vydruth commented Oct 22, 2020

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,

  1. Changes the previous SNAPSHOT version to a new release version in the gradle.properties file
  2. 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!

@Vydruth
Copy link
Author

Vydruth commented Oct 22, 2020

If that is not already supported I think it is a good feature to add.

@Vydruth Vydruth changed the title Provide ability to skip step of committing SNAPSHOT version to master Provide ability to skip the step of committing SNAPSHOT version to master Oct 22, 2020
@nngo
Copy link

nngo commented Nov 13, 2020

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

@Vydruth
Copy link
Author

Vydruth commented Dec 17, 2020

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. :)

@SankarRaman-S
Copy link

Vydruth, Have you tried this ? Looking for a similar option to skip the snapshot version update on master.

@Hillkorn
Copy link
Collaborator

Hillkorn commented Jul 8, 2024

You can disable the updateVersion & commitNewVersion task to skip the commit of the this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants