Skip to content

Commit 3060049

Browse files
committed
isSnapshot may be false for manaully overriden versions (-Dscala.version=2.X.Y)
1 parent 83451fd commit 3060049

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.sbt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ useJGit
88
// For testing, the version may be overridden with -Dproject.version=...
99
versionWithGit
1010

11+
isSnapshot := {
12+
git.overrideVersion(git.versionProperty.value)) match {
13+
case Some(v) => v.endsWith("-SNAPSHOT") || git.gitUncommittedChanges.value
14+
case _ => isSnapshot.value // defined in SbtGit.scala
15+
}
16+
}
17+
1118
Versioning.settings
1219

1320
// necessary since sbt 0.13.12 for some dark and mysterious reason

0 commit comments

Comments
 (0)