Skip to content

Commit

Permalink
Allow omitted '.git' postfix
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Rudolph <johannes.rudolph@gmail.com>
  • Loading branch information
raboof and jrudolph committed Jul 6, 2020
1 parent 74e03af commit ccc8a13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/typesafe/sbt/SbtGit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ object SbtGit {
scmInfo := {
val user = """(?:[^@\/]+@)?"""
val domain = """([^\/]+)"""
val gitPath = """(.*)\.git\/?"""
val gitPath = """(.*)(?:\.git)?\/?"""
val unauthenticated = raw"""(?:git|https?|ftps?)\:\/\/$domain\/$gitPath""".r
val ssh = raw"""ssh\:\/\/$user$domain\/$gitPath""".r
val headlessSSH = raw"""$user$domain:$gitPath""".r

def buildScmInfo(domain: String, repo: String) = Option(
ScmInfo(
url(s"https://$domain/$repo"),
Expand Down

0 comments on commit ccc8a13

Please # to comment.