Set gitTagToVersionNumber
per-project in a multi-project build
#144
Labels
gitTagToVersionNumber
per-project in a multi-project build
#144
In a project I am working on we have a mono-repo that includes various subprojects that are versioned and released separately. We'd like to switch to using sbt-git for these versions, so that for example we could use tags like
Project1-vA.B.C
to get the version of Project1 andProject2-vX.Y.Z
to get the version of Project2.However, it seems there is no convenient way to change the
gitTagToVersionNumber
setting for different projects within a multi-project build because the setting exposed by the plugin is explicitly scoped toThisBuild
. To get this to work I had to essentially copy theversion
setting into my build definition, but modify it to refer to thecom.typesafe.sbt.SbtGit.GitKeys.gitTagToVersionNumber
directly, instead ofgit.gitTagToVersionNumber
which is scoped toThisBuild
.I wonder if there's a way to make this work more cleanly without otherwise changing the way the plugin works by default. In particular, it seems to me that the setting implementations for things like
version
should refer to the underlying keys and let scope delegation handle the rest, rather than referring to explicitly globally-scoped keys. However, I'll admit that scoping and delegation can be confusing so this might have some downside I can't see.The text was updated successfully, but these errors were encountered: