Sbt task to increase the project version

Is there a SBT task to increase the version of the project?

Given the initial configuration of something like the following build.sbt

name := 'My Project' organization := 'org.example' version := '0.1.0' 

and the version range of major.minor.patch, I was hoping for the SBT task, for example

 > incrementVersionPatch 

which will lead to version 0.1.1 .

(The corresponding incrementVersionMinor and incrementVersionMajor also ideal.)

It seems to me that this already exists, but cannot find a way to do this.

+8
scala sbt
source share
1 answer

I think you need an sbt-release plugin that "provides a custom release process that you can add to your project." with the parameter release-version-file , which is set to file("version.sbt") by default and points to $PROJECT_ROOT/version.sbt ".

+6
source share

All Articles