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

The plugin gradle-gitflow does not support non-version tags #3

Open
jaubuchon opened this issue Nov 29, 2016 · 0 comments
Open

The plugin gradle-gitflow does not support non-version tags #3

jaubuchon opened this issue Nov 29, 2016 · 0 comments

Comments

@jaubuchon
Copy link

Given:
A git repository that is having tags that are not related to a version.

$ git tag
0.1.0
1.2.3
simpletag

When:
Resolving the current version

Then:

Caused by: Unexpected character 'LETTER(p)' at position '0', expecting '[DIGIT]'
        at com.github.zafarkhaja.semver.VersionParser.consumeNextCharacter(VersionParser.java:516)
        at com.github.zafarkhaja.semver.VersionParser.digits(VersionParser.java:448)
        at com.github.zafarkhaja.semver.VersionParser.numericIdentifier(VersionParser.java:408)
        at com.github.zafarkhaja.semver.VersionParser.parseVersionCore(VersionParser.java:285)
        at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:255)
        at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:195)
        at com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
        at com.github.zafarkhaja.semver.Version$valueOf.call(Unknown Source)
        at com.github.amkay.gradle.gitflow.version.NearestVersionLocator$_locate_closure1.doCall(NearestVersionLocator.groovy:101)
        at com.github.amkay.gradle.gitflow.version.NearestVersionLocator.locate(NearestVersionLocator.groovy:100)
        at com.github.amkay.gradle.gitflow.version.NearestVersionLocator$locate.call(Unknown Source)
        at com.github.amkay.gradle.gitflow.strategy.BranchDevelopStrategy.doInfer(BranchDevelopStrategy.groovy:44)
        at com.github.amkay.gradle.gitflow.strategy.AbstractStrategy.infer(AbstractStrategy.groovy:58)
        at com.github.amkay.gradle.gitflow.strategy.Strategy$infer$0.call(Unknown Source)
        at com.github.amkay.gradle.gitflow.version.DelayedVersionWithType.infer(DelayedVersionWithType.groovy:55)

Our need:
We need to be able to appose not-related version tags to commits

Proposed solution:

At line 101 of:
https://github.com/amkay/gradle-gitflow/blob/1dfd896193e9db2d283cc2aba030742203d4780a/src/main/groovy/com/github/amkay/gradle/gitflow/version/NearestVersionLocator.groovy

Handle the exception "ParseException" threw by the method "Version.valueOf" and go to the next tag.

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

No branches or pull requests

1 participant