-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathdeploy.sbt.disabled
More file actions
31 lines (27 loc) · 883 Bytes
/
deploy.sbt.disabled
File metadata and controls
31 lines (27 loc) · 883 Bytes
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
enablePlugins(Travis)
enablePlugins(SonatypeRelease)
enablePlugins(Optimization)
scalacOptions in ThisBuild ++= {
import scala.math.Ordering.Implicits._
if (VersionNumber(scalaVersion.value).numbers < Seq(2L, 12L)) {
Seq("-Ybackend:GenBCode")
} else {
Nil
}
}
lazy val secret = project.settings(publishArtifact := false).in {
val secretDirectory = file(sourcecode.File()).getParentFile / "secret"
sys.env.get("GITHUB_PERSONAL_ACCESS_TOKEN").foreach { token =>
IO.delete(secretDirectory)
org.eclipse.jgit.api.Git
.cloneRepository()
.setURI("https://github.com/ThoughtWorksInc/tw-data-china-continuous-delivery-password.git")
.setDirectory(secretDirectory)
.setCredentialsProvider(
new org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider(token, "")
)
.call()
.close()
}
secretDirectory
}