From 0f99c9638c8e3eac31a5fe18bff126bed3199be0 Mon Sep 17 00:00:00 2001 From: Tibor Casteleijn Date: Tue, 24 Dec 2024 15:08:00 +0100 Subject: [PATCH] Modify `build.sbt` to dynamically fetch the IO version from environment variables with a fallback to version 1.10.3, rather than using the sbt version value. --- project/build.sbt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/project/build.sbt b/project/build.sbt index 4f90b20e14..3c4eef6cc9 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -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 )