Skip to content

Commit

Permalink
Don't quit sbt on dynver git tag check failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Nov 9, 2022
1 parent 8c31b4d commit 2d05377
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,10 @@ def internalProject(projectId: String, additionalSettings: sbt.Def.SettingsDefin

Global / onLoad := (Global / onLoad).value.andThen { s =>
val v = version.value
val log = sLog.value
if (dynverGitDescribeOutput.value.hasNoTags)
throw new MessageOnlyException(
s"Failed to derive version from git tags. Maybe run `git fetch --unshallow`? Derived version: $v"
log.error(
s"Failed to derive version from git tags. Maybe run `git fetch --unshallow` or `git fetch upstream` on a fresh git clone from a fork? Derived version: $v"
)
s
}

0 comments on commit 2d05377

Please sign in to comment.