From 8f9d649dcaca7aeeee7cebfa1c8c35ae422657a1 Mon Sep 17 00:00:00 2001 From: Albert Meltzer <7529386+kitbellew@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:14:05 -0800 Subject: [PATCH] SBT: in local builds, use simple -SNAPSHOT version --- build.sbt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.sbt b/build.sbt index 6efa24ea..a9e0c6c1 100644 --- a/build.sbt +++ b/build.sbt @@ -77,6 +77,14 @@ def crossSetting[A]( inThisBuild( List( + version ~= { dynVer => + if (System.getenv("CI") != null) dynVer + else { + import scala.sys.process._ + // drop `v` prefix + "git describe --abbrev=0 --tags".!!.drop(1).trim + "-SNAPSHOT" + } + }, scalaVersion := scala213, crossScalaVersions := allScalaVersions, organization := "org.scalameta",