Skip to content

Commit

Permalink
Modify build.sbt to dynamically fetch the IO version from environme…
Browse files Browse the repository at this point in the history
…nt variables with a fallback to version 1.10.3, rather than using the sbt version value.
  • Loading branch information
Tibor Casteleijn committed Dec 24, 2024
1 parent b627360 commit 0f99c96
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Get io version from environment or fall back to a known working version
def ioVersion = sys.env.get("BUILD_VERSION")
.orElse(sys.props.get("sbt.build.version"))
.getOrElse("1.10.3")

libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.4.3",
// sbt-native-packager and sbt-github-pages pull in an incompatible
// version of sbt-io which will break the build as soon as the
// sbt-bloop plugin is also present
"org.scala-sbt" %% "io" % sbtVersion.value
// Use the determined version instead of sbtVersion.value
"org.scala-sbt" %% "io" % ioVersion
)

0 comments on commit 0f99c96

Please sign in to comment.