Skip to content

Config to automatically increment to next major, minor or patch version #227

@mkurz

Description

@mkurz

I understand how sbt-dynver works and how it comes up with the version string.

However IMHO it would be usefull if there would be a config which increments either the major, minor or patch version, plus ignore the distance.
For example, right now in Play's master branch we are working towards 2.9.0, also we are in the process of moving to GitHub actions and sbt-ci-release and want to publish sonatype snapshots on each push to the master branch.
Right now the version in Play's master branch looks like this:

  • 2.8.1+1506-a4b4198b-SNAPSHOT
  • 2.8.1+1506-a4b4198b+20220214-1249-SNAPSHOT when dirty

(2.8.1 because the 2.8.1 was tagged before we branched off a 2.8.x branch).
So people asked us already why this is 2.8.1... and not 2.9.0-SNAPSHOT.
So actually what we want to publish to the sonatype repo is:

  • 2.9.0-a4b4198b-SNAPSHOT
  • 2.9.0-a4b4198b+20220214-1249-SNAPSHOT when dirty

which makes it clearer these are snapshots of the upcoming 2.9.0 release. I think this is what people are used to.
So actually we would have to remove the distance and increment one of the major/minor/patch parts.
The same for the 2.8.x branch right now, it would be nice to publish 2.8.14-...-SNAPSHOT versions instead of 2.8.13+42-....-SNAPSHOT.

Actually we have a pull request already which achieves that, however I think it would be nice to have this build into sbt-dynver: playframework/playframework#11168

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