Skip to content

Commit

Permalink
Merge pull request #14 from ThoughtWorksInc/template
Browse files Browse the repository at this point in the history
Update template
  • Loading branch information
Atry authored Apr 17, 2019
2 parents 039472d + 9b7356d commit 45654c5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
2 changes: 0 additions & 2 deletions dynver-dash-separator.sbt

This file was deleted.

2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "7.0.1")
addSbtPlugin("com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "7.0.1+28-0b91b5bf")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.5")

Expand Down
2 changes: 1 addition & 1 deletion project/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M11")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M13-4")
33 changes: 18 additions & 15 deletions secret.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
lazy val secret = project.settings(publishArtifact := false).in {
val secretDirectory = file(sourcecode.File()).getParentFile / "secret"
for (token <- sys.env.get("GITHUB_PERSONAL_ACCESS_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()
lazy val secret = {
for (token <- sys.env.get("GITHUB_PERSONAL_ACCESS_TOKEN")) yield {
val secret = project.settings(publishArtifact := false).in {
val secretDirectory = file(sourcecode.File()).getParentFile / "secret"
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
}
secret
}
secretDirectory
}
}.getOrElse(null)

0 comments on commit 45654c5

Please sign in to comment.