-
Notifications
You must be signed in to change notification settings - Fork 32
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
How to bump and start a pre-release version? #110
Comments
Did you commit your changes? You will also need to use
|
Yes -- committed. After adding
Here is startingVersion = '1.0.11'
matching {
major = 0
minor = 0
}
preRelease {
startingVersion = 'alpha.0'
pattern = /alpha/
// The bumping scheme is alpha.0 -> alpha.1 -> ... -> alpha.n
bump = {
"alpha.${((it - ~/^alpha\./) as int) + 1}"
}
} I'm not sure why All of the existing tags in this project start with "v" but moving forward we are not using a prefix at all. not sure if this is causing issues or not. |
This is kind of subtle and I should probably actually check for it and print out a warning/error. I kind of mention this in the documentation:
So what is happening here is that you have your It's not clear why it's suggesting Also, what is the latest version tag you have on the repo? UPDATE Ok, I think I know what is happening. You probably have tags like This is an interesting edge case because your configuration is inconsistent in multiple ways :):
I'll see if I can check/test for configurations like this. Maybe a dedicated task. There may be some simple checks that could be done up-front though. Like pointing out that It's perhaps not clear that I'm also going to rewrite that error message and maybe add a debug flag to print diagnostic information to make things easier. |
Our existing tags all start with "v", so don't think they'd be included since we have not configured this to use a prefix. I was also surprised it wasn't picking up the This is the first "version tag" I'm creating for this repo using this plugin. I did try removing the entire
So I assumed that block was required? Is it possible that the plugin, even though I have no Really appreciate your help! |
I took a very quick look through the code and it seems like this regex should be updated and/or modified so that it optionally includes the gradle-semantic-build-versioning/src/main/groovy/net/vivin/gradle/versioning/VersionUtils.groovy Line 24 in a1f1252
Note that tagPattern = ~/^\d++\.\d++\.\d++/ Now I get the correct tag when I run: ./gradlew tag -PbumpComponent=minor -PnewPreRelease -Prelease So a bit of misunderstanding on my part but I'm glad it's working now! I may suggest that the default Thanks again! |
The prefix doesn't affect what tags are picked up -- it's just added to the version when making a tag.
That's pretty odd. If the block is not there, it doesn't even consider it. It's hard to tell without knowing the state of your repo and your existing tags.
Yes
The reason that
I think the main issue is that I haven't really provided a good explanation as to how this plugin actually does what it does, and how the different options affect that. |
Suppose the latest tag is 1.0.0 and I just made some changes which are destined for version 1.1.0. So I want to publish a pre-release package as version 1.1.0-alpha.0, but when I run ...
I get the error message:
I suppose I'm missing some understanding here. I've read through the documentation repeatedly but can't seem to figure out the proper usage via the command line. Is there other documentation/examples I might be missing?
The text was updated successfully, but these errors were encountered: