sbt / sbt-ci-release

sbt plugin to automate Sonatype releases from GitHub Actions
Apache License 2.0
286 stars 76 forks source link

Wrong output in generated `scmInfo` #211

Closed alejandrohdezma closed 3 years ago

alejandrohdezma commented 3 years ago

I'm seeing a weird error after updating from sbt-ci-release 1.5.7 to 1.5.9. The generated scmInfo value contains a duplicated .git on both the connection and the devConnection.

Steps to find this error

sbt new scala/scala-seed.g8 && cd scala-seed-project/ && git init && git remote add origin git@github.com:foo/bar.git && echo 'addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9")' > project/plugins.sbt && sbt "show scmInfo"

Expected (green) vs actual (red) output

ScmInfo(
  https://github.com/foo/bar.git, 
-  scm:git:https://github.com/foo/bar.git, 
+  scm:git:https://github.com/foo/bar.git.git, 
-  Some(scm:git:git@github.com:foo/bar.git)
+  Some(scm:git:git@github.com:foo/bar.git.git)
)

If changing to 1.5.7 with echo 'addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")' > project/plugins.sbt and running sbt "show scmInfo" again output is the expected one.

Possible causes

I haven't seen any change directly in sbt-ci-release that will provoke such an error. The only relevant thing I've seen is that in 1.5.9 the sbt-sonatype dependency was upgraded, although I didn't see anything relevant there.

olafurpg commented 3 years ago

Thank you for reporting and providing such a clear minimal reproduction (with expected output!). The scmInfo setting is configured by sbt-git, not sbt-ci-release? Would you be able to open an issue here https://github.com/sbt/sbt-git/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc I tried to move the issue since sbt-ci-release is now part of the sbt organization but I don't seem to have permissions for that.

alejandrohdezma commented 3 years ago

Will do! Thanks @olafurpg