shipkit/shipkit-auto-version

Support 1.0.0-beta.* notation

jplaisted opened this issue · 3 comments

To reproduce:

  1. Change version.properties to include a beta tag and tag version wildcard (e.g. version=1.0.0-beta.*, per mockito's versioning guidelines / learnings on tags)
  2. Run any gradle command
  3. Observe the build error below

Might be an issue with the downstream library used for parsing, but still worth noting here?

Caused by: org.shipkit.auto.version.VersionSpec$IncorrectVersionFormat: Problems deducting the version automatically. Expected correct 'version' property in file: /Users/jplaiste/opensource/datahub-gma/version.properties
Correct examples: 'version=1.0.*', 'version=2.10.100'
        at org.shipkit.auto.version.VersionSpec.readVersionSpec(VersionSpec.java:39)
        at org.shipkit.auto.version.AutoVersion.deductVersion(AutoVersion.java:42)
        at org.shipkit.auto.version.AutoVersion.deductVersion(AutoVersion.java:33)
        at org.shipkit.auto.version.AutoVersionPlugin.apply(AutoVersionPlugin.java:12)
        at org.shipkit.auto.version.AutoVersionPlugin.apply(AutoVersionPlugin.java:9)
        at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:43)
        at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:51)
        at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:181)
        at org.gradle.api.internal.plugins.DefaultPluginManager.access$300(DefaultPluginManager.java:51)
        at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:276)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.plugins.DefaultPluginManager$2.execute(DefaultPluginManager.java:159)
        at org.gradle.api.internal.plugins.DefaultPluginManager$2.execute(DefaultPluginManager.java:156)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:49)
        at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:156)
        ... 161 more
Caused by: Unexpected character 'ILLEGAL(*)' at position '11', 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.preReleaseIdentifier(VersionParser.java:339)
        at com.github.zafarkhaja.semver.VersionParser.parsePreRelease(VersionParser.java:311)
        at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:261)
        at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:195)
        at com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
        at org.shipkit.auto.version.VersionSpec.readVersionSpec(VersionSpec.java:37)
        ... 181 more

Hey, we don't support "-beta.*" at the moment. Do you need this for your use case?

Not immediately, or potentially ever. I'm still working out how we want to do releases (and branches). New project, no clear standards here :)

I was just testing stuff out.

Ok. We'll table this feature for now.

BTW. I improved the error message: #29