We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 65dd58f + f288743 commit 8f89fa5Copy full SHA for 8f89fa5
plugin/src/main/scala/com/geirsson/CiReleasePlugin.scala
@@ -143,7 +143,19 @@ object CiReleasePlugin extends AutoPlugin {
143
case None => backPubVersionToCommand(v)
144
}
145
},
146
- version ~= dropBackPubCommand
+ version := {
147
+ val v = version.value
148
+ dynverGitDescribeOutput.value match {
149
+ case Some(gitDescribe) =>
150
+ val tagVersion = gitDescribe.ref.dropPrefix
151
+ if (gitDescribe.isCleanAfterTag) {
152
+ dropBackPubCommand(v)
153
+ } else if (v.startsWith(tagVersion)) {
154
+ dropBackPubCommand(tagVersion) + v.drop(tagVersion.size)
155
+ } else v
156
+ case _ => v
157
+ }
158
159
)
160
161
override lazy val globalSettings: Seq[Def.Setting[_]] = List(
0 commit comments