Skip to content

Commit

Permalink
fix: #1259 make GITHUB_TOKEN optional (#1275)
Browse files Browse the repository at this point in the history
Signed-off-by: FabioPinheiro <[email protected]>
  • Loading branch information
FabioPinheiro authored Aug 2, 2024
1 parent 45e0613 commit 1c9cbd0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ inThisBuild(
run / connectInput := true,
releaseUseGlobalVersion := false,
versionScheme := Some("semver-spec"),
githubOwner := "hyperledger",
githubRepository := "identus-cloud-agent",
resolvers += "Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository",
resolvers += "jitpack" at "https://jitpack.io",
)
Expand Down
13 changes: 12 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6")

// In order to import proper version of com.google.protobuf.ByteString we need to add this dependency
libraryDependencies ++= Seq("com.thesamet.scalapb" %% "compilerplugin" % "0.11.17")

// Github Packages
if (sys.env.get("GITHUB_TOKEN").isDefined) {
println(s"Enable plugin sbt-dependency-tree since env GITHUB_TOKEN is defined.")
// The reason for this is that the plugin needs the variable to be defined. We don't want to have that requirement.
libraryDependencies += {
val dependency = "com.codecommit" % "sbt-github-packages" % "0.5.3"
val sbtV = (pluginCrossBuild / sbtBinaryVersion).value
val scalaV = (update / scalaBinaryVersion).value
Defaults.sbtPluginExtra(dependency, sbtV, scalaV)
}
} else libraryDependencies ++= Seq[ModuleID]()

0 comments on commit 1c9cbd0

Please sign in to comment.