Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ lazy val root = (project in file("."))
.settings(
name := "scala-http-client",
organization := "io.moia",
version := "1.3.1",
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
scmInfo := Some(ScmInfo(url("https://github.com/moia-dev/scala-http-client"), "scm:git@github.com:moia-dev/scala-http-client.git")),
homepage := Some(url("https://github.com/moia-dev/scala-http-client")),
Expand All @@ -24,6 +23,11 @@ lazy val root = (project in file("."))
Defaults.itSettings,
scalacOptions in IntegrationTest := (scalacOptions in Compile).value.filterNot(_ == "-Ywarn-dead-code")
)
.settings(sbtGitSettings)
.enablePlugins(
GitVersioning,
GitBranchPrompt
)

val akkaVersion = "2.6.4"
val akkaHttpVersion = "10.1.11"
Expand Down Expand Up @@ -93,3 +97,17 @@ lazy val sonatypeSettings = {
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credential")
)
}

lazy val sbtVersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r

lazy val sbtGitSettings = Seq(
git.useGitDescribe := true,
git.baseVersion := "0.0.0",
git.uncommittedSignifier := None,
git.gitTagToVersionNumber := {
case sbtVersionRegex(v, "") => Some(v)
case sbtVersionRegex(v, "SNAPSHOT") => Some(s"$v-SNAPSHOT")
case sbtVersionRegex(v, s) => Some(s"$v-$s-SNAPSHOT")
case _ => None
}
)
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")

// publishSigned
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")