Skip to content

Commit 2a37097

Browse files
committed
SBT: in local builds, use simple -SNAPSHOT version
1 parent 5261e85 commit 2a37097

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.sbt

+8
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ def crossSetting[A](
7777

7878
inThisBuild(
7979
List(
80+
version ~= { dynVer =>
81+
if (System.getenv("CI") != null) dynVer
82+
else {
83+
import scala.sys.process._
84+
// drop `v` prefix
85+
"git describe --abbrev=0 --tags".!!.drop(1).trim + "-SNAPSHOT"
86+
}
87+
},
8088
scalaVersion := scala213,
8189
crossScalaVersions := allScalaVersions,
8290
organization := "org.scalameta",

0 commit comments

Comments
 (0)