Skip to content

Use the Reckoner to calculate a local development version with -SNAPSHOT #114

@klu2

Description

@klu2

In #112 we decided to not apply the Reckon-Plugin locally (when not being on a CI-server) as of the discussion in ajoberstar/reckon#189 and instead hardcode the current version to 1.0.0-SNAPSHOT.

As this might be really confusing to developers, we should enhance this bypass as follows:

  • If we are not on CI-servers, instantiate a Reckoner (but not the whole Gradle-Plugin)
  • Configure it inferring the scope as patch, using stages rc and final (so just like the defaults inside our AutoConfigureSettingsPlugin
  • Then run the Reckoner manually (again, only the core-class behind, not the plugin), you will get a version like 0.8.5-rc.0.0+20221111T075331Z which we don't want
  • Then use convert this version manually to 0.8.5-SNAPSHOT and use this as the new project.version

That way:

  • we still stick to semantic versioning as defined in Gradle (where 0.8.5-SNAPSHOT comes after 0.8.5-rc.0.0+20221111T075331Z)
  • we are not getting exceptions from Reckoner which follows the SemVer spec on purpose
  • we are not providing the tasks reckonTagCreate and reckonTagPush locally (which is good, as we're bypassing reckoner-default-logic)
  • we still have a local development version that releates to our reckoned version on the CI server and is not just a dumb 1.0.0-SNAPSHOT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions