Closed rising3 closed 3 years ago
Getting version from tag makes perfect sense.
However it might be tricky to make it work with several branches. For example: you've version 1.x and 2.x and branches release_1 (you tag from this branch say, v1.0.1, v.1.0.2, v.1.1.9 ) release_2 (you tag from this branch, say v2.0.4, v.2.0.6, v.2.6.2 )
say latest version was v.2.6.2, then if you try to release next version from 1.x branch it will be bumped to 2.6.3.
Different solution might be getting latest tag from branch you're currently. in this case bump from v.1.1.9 will be v.1.1.10 and from v.2.6.2 will be v.2.6.3 which allow users to maintain several active versions.
Would be really nice to chat with you over this issue, and I think I could send you merge request this Sunday or something.
@nloboda
It's a good point.I'm aware of the point. When releasing on a maintenance branch, we plan to guess the branch name and get the next version from the branch name.
TAG LISTS
e.g.) when releasing on 1.0.x branch
However, if you are releasing on the maintenance branch, you must meet the following requirements:
thx.
Thanks. I'll try to come up with something tomorrow
Hi @rising3 ,
I've did some work on storing versions in tags. https://github.com/nloboda/semver-gradle-plugin/pull/1/files
This is JFYI update, I don't feel like it's ready to be merged yet. I'll try to adjust this to adhere ticket specification and coding standard tomorrow. and drop-in update.
Thanks!
@rising3
Hi, I kindly request for comments on pr. https://github.com/rising3/semver-gradle-plugin/pull/5
Regards, Nikolay.
Add new feature for Get current version from latest tag.
Summary
FILE MODE:
TAG MODE:
Plugin Extension
manageVersion
filename
(FILE MODE Only)
noGitCommand
(FILE MODE Only)
noGitInit
(FILE MODE Only)
noGitCommitVersion
(FILE MODE Only)
noGitTagVersion
(FILE MODE Only)
noGitPush
(FILE MODE Only)
noGitPushTag
(FILE MODE Only)