Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong output in generated scmInfo #193

Closed
alejandrohdezma opened this issue Oct 4, 2021 · 2 comments · Fixed by #194
Closed

Wrong output in generated scmInfo #193

alejandrohdezma opened this issue Oct 4, 2021 · 2 comments · Fixed by #194

Comments

@alejandrohdezma
Copy link

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

Steps to find this error

  • Create a new Scala project: sbt new scala/scala-seed.g8 && cd scala-seed-project/
  • Initialize an empty Git repository: git init
  • Add a fake remote: git remote add origin git@github.com:foo/bar.git
  • Add sbt-ci-release: echo 'addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1")' > project/plugins.sbt
  • Run sbt "show scmInfo"
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.typesafe.sbt" % "sbt-git" % "1.0.1")' > 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.0.0 with echo 'addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")' > project/plugins.sbt and running sbt "show scmInfo" again output is the expected one.

Possible causes

This change seems to be provoking the issue.

@raboof raboof self-assigned this Oct 5, 2021
raboof added a commit to raboof/sbt-git that referenced this issue Oct 5, 2021
@raboof
Copy link
Collaborator

raboof commented Oct 5, 2021

Oops, so sorry about that. Could you have a look at #194?

@raboof raboof removed their assignment Oct 5, 2021
@alejandrohdezma
Copy link
Author

Thanks for the swift response 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants