-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sbt
38 lines (36 loc) · 1.66 KB
/
publish.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
val VersionRegex = "v([0-9]+.[0-9]+.[0-9]+)-?(.*)?".r
val MilestoneRegex = "^M[0-9]$".r
lazy val versioningSettings =
Seq(
git.baseVersion := "0.0.0",
git.useGitDescribe := true,
git.uncommittedSignifier := None,
git.gitTagToVersionNumber := {
case VersionRegex(v, "") => Some(v) //e.g. 1.0.0
case VersionRegex(v, s)
if MilestoneRegex.findFirstIn(s).isDefined => Some(s"$v-$s") //e.g. 1.0.0-M1
case VersionRegex(v, "SNAPSHOT") => Some(s"$v-SNAPSHOT") //e.g. 1.0.0-SNAPSHOT
case VersionRegex(v, s) => Some(s"$v-$s-SNAPSHOT") //e.g. 1.0.0-2-commithash-SNAPSHOT
case _ => None
}
)
publishTo := {
if (isSnapshot.value){
Some("Artifactory Realm" at "http://oss.jfrog.org/artifactory/oss-snapshot-local")
}
else {
publishTo.value
}
}
bintrayPackage := name.value
credentials ++= List(Path.userHome / ".bintray" / ".artifactory").filter(_.exists).map(Credentials(_)) //For snapshots
pomIncludeRepository := { _ => false } //remove optional dependencies from our pom
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/agaro1121/PathOfExileApiClient"))
scmInfo := Some(ScmInfo(url("https://github.com/agaro1121/PathOfExileApiClient"), "scm:[email protected]:agaro1121/PathOfExileApiClient.git"))
developers := List(Developer("agaro1121", "Anthony Garo", "[email protected]", url("https://github.com/agaro1121")))
publishArtifact in Test := false
bintrayReleaseOnPublish := false //We're releasing via travis, set to true to automatically release on publish instead
publishMavenStyle := true
bintrayRepository := "com.github.agaro1121"
bintrayOrganization in bintray := None