Use git from the path instead of jgit/sbt-git (#27756)
* Use git from the path instead of jgit/sbt-git * Branch name extraction working with older git
This commit is contained in:
parent
1f56807732
commit
efe6d96156
2 changed files with 14 additions and 10 deletions
|
|
@ -6,7 +6,7 @@ import sbt._
|
|||
import sbt.Keys._
|
||||
import sbtwhitesource.WhiteSourcePlugin.autoImport._
|
||||
import sbtwhitesource._
|
||||
import com.typesafe.sbt.SbtGit.GitKeys._
|
||||
import scala.sys.process._
|
||||
|
||||
object Whitesource extends AutoPlugin {
|
||||
override def requires = WhiteSourcePlugin
|
||||
|
|
@ -17,15 +17,20 @@ object Whitesource extends AutoPlugin {
|
|||
// do not change the value of whitesourceProduct
|
||||
whitesourceProduct := "Lightbend Reactive Platform",
|
||||
whitesourceAggregateProjectName := {
|
||||
(moduleName in LocalRootProject).value + "-" + (
|
||||
if (isSnapshot.value)
|
||||
if (gitCurrentBranch.value == "master") "master"
|
||||
val name = (moduleName in LocalRootProject).value
|
||||
val wsVersionName =
|
||||
if (isSnapshot.value) {
|
||||
val currentGitBranch = "git rev-parse --abbrev-ref HEAD".!!.trim
|
||||
if (currentGitBranch == "master") "master"
|
||||
else "adhoc"
|
||||
else CrossVersion.partialVersion((version in LocalRootProject).value)
|
||||
.map { case (major,minor) => s"$major.$minor-stable" }
|
||||
.getOrElse("adhoc"))
|
||||
} else
|
||||
CrossVersion
|
||||
.partialVersion((version in LocalRootProject).value)
|
||||
.map { case (major, minor) => s"$major.$minor-stable" }
|
||||
.getOrElse("adhoc")
|
||||
|
||||
s"$name-$wsVersionName"
|
||||
},
|
||||
whitesourceForceCheckAllDependencies := true,
|
||||
whitesourceFailOnError := true,
|
||||
)
|
||||
whitesourceFailOnError := true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ addSbtPlugin("com.lightbend.akka" % "sbt-paradox-akka" % "0.24")
|
|||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox-apidoc" % "0.2")
|
||||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.6.5")
|
||||
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.16")
|
||||
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
|
||||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.2.0") // for maintenance of copyright file header
|
||||
addSbtPlugin("com.hpe.sbt" % "sbt-pull-request-validator" % "1.0.0")
|
||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue