我正在使用 sbt-release 设置自定义标签名称作为发布过程的一部分
releaseTagName := s"v${version.value}-${name.value}",
问题是,在将标签推送到 github的 pushChanges 发布步骤中,它似乎使用了两个标签。
[info] * [new tag] list -> list
[info] * [new tag] v0.3-primary -> v0.3-primary
[info] ! [rejected] v0.1 -> v0.1 (already exists)
v0.3-primary 是我配置的releaseTagName
. 标签 v0.1 已存在,因此此步骤失败。我似乎无法弄清楚为什么它会推动这个标签。
[info] Setting version to '0.4-SNAPSHOT'.
[info] Reapplying settings...
[info] Set current project to primary (in build file:/source/capture-app/)
[info] [master b594aeb] Setting version to 0.4-SNAPSHOT
[info] 1 file changed, 1 insertion(+), 1 deletion(-)
Push changes to the remote repository (y/n)? [y]
[info] 4f29ecf..b594aeb master -> master
[info] To https://github.com/...
[info] * [new tag] list -> list
[info] * [new tag] v0.3-primary -> v0.3-primary
[info] ! [rejected] v0.1 -> v0.1 (already exists)
[info] error: failed to push some refs to 'https://github.com/...
[info] hint: Updates were rejected because the tag already exists in the remote.
java.lang.RuntimeException: Nonzero exit value: 1
at scala.sys.package$.error(package.scala:27)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:131)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
at sbtrelease.ReleaseStateTransformations$$anonfun$pushChangesAction$1.apply(ReleaseExtra.scala:258)
at sbtrelease.ReleaseStateTransformations$$anonfun$pushChangesAction$1.apply(ReleaseExtra.scala:245)
有人对发生的事情有解释吗?