I am using https://github.com/sbt/sbt-git to get the benefit of automatic versioning as descript in the section Versioning with Git.
My build.sbt
file looks as the following:
version := "0.1.0"
scalaVersion := "2.12.8"
scalacOptions ++= Seq(
"-encoding", "UTF-8", // source files are in UTF-8
"-deprecation", // warn about use of deprecated APIs
"-unchecked", // warn about unchecked type parameters
"-feature", // warn about misused language features
"-language:higherKinds", // allow higher kinded types without `import scala.language.higherKinds`
"-Xlint", // enable handy linter warnings
"-Xfatal-warnings", // turn compiler warnings into errors
"-Ypartial-unification" // allow the compiler to unify type constructors of different arities
)
scalacOptions in(Compile, console) ~= {
_.filterNot(Set("-Xlint"))
}
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "1.6.0",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2"
)
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.14.0" % "test",
"org.scalactic" %% "scalactic" % "3.0.6" % "test",
"org.scalatest" %% "scalatest" % "3.0.6" % "test"
)
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-slf4j" % "2.5.22",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
libraryDependencies += "com.dimafeng" %% "testcontainers-scala" % "0.25.0" % "test"
enablePlugins(JavaServerAppPackaging)
enablePlugins(DockerPlugin)
enablePlugins(GitVersioning)
dockerExposedPorts := Seq(8080)
git.formattedShaVersion := git.gitHeadCommit.value map { sha =>
s"$sha".substring(0, 7)
}
dockerUpdateLatest := true
dockerAlias := DockerAlias(None, Some("zerocoder"), (packageName in Docker).value, git.gitDescribedVersion.value)
After the commit, it does not increment from version "0.1.0" to "0.2.0" automatically.
What am I doing wrong?