You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use case where we do not use the tag prefix (our projects are tagged like 4.1.2, 12.0.0...), and make use of DynVer.isSnapshot to determine where we want to publish projects.
ThisBuild/ publishTo := {
valnexus:String="https://nexus.example.net/repository/my-repository"vala=if (DynVer.isSnapshot())
Some("Sonatype Nexus Repository Manager" at nexus +"-dev-snapshot")
else {
Some("Sonatype Nexus Repository Manager" at nexus +"-release")
}
a match {
caseSome(v) => streams.value.log.log(Level.Info, s">>> ${v.toString()} hasNoTag:${DynVer.hasNoTags()} isDirty:${DynVer.isDirty()}${DynVer.tagPrefix}")
}
a
}
However in this example we always log the dev-snapshot repository, because hasNoTag is always true, because it is implemented as follows:
defhasNoTags():Boolean=!ref.isTag
And isTag is based on the prefix (which we do not use, we have set ThisBuild / dynverVTagPrefix := false:
defisTag:Boolean= value.startsWith(prefix)
I think it would be better to make use of inheritance on GitRef, so that a proper isTag could be implemented for GitCommit, GitTag, etc.
The text was updated successfully, but these errors were encountered:
We have a use case where we do not use the tag prefix (our projects are tagged like 4.1.2, 12.0.0...), and make use of
DynVer.isSnapshot
to determine where we want to publish projects.However in this example we always log the dev-snapshot repository, because
hasNoTag
is always true, because it is implemented as follows:And
isTag
is based on the prefix (which we do not use, we have setThisBuild / dynverVTagPrefix := false
:I think it would be better to make use of inheritance on GitRef, so that a proper
isTag
could be implemented for GitCommit, GitTag, etc.The text was updated successfully, but these errors were encountered: