diff options
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/mill/scalalib/publish/VersionControl.scala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scalalib/src/mill/scalalib/publish/VersionControl.scala b/scalalib/src/mill/scalalib/publish/VersionControl.scala index cfb95402..aad38ac3 100644 --- a/scalalib/src/mill/scalalib/publish/VersionControl.scala +++ b/scalalib/src/mill/scalalib/publish/VersionControl.scala @@ -27,13 +27,20 @@ case class SCM( ) object VersionControl { - def github(owner: String, repo: String, tag: Option[String] = None): VersionControl = + def github(owner: String, repo: String, tag: Option[String] = None): VersionControl = VersionControl( browsableRepository = Some(s"https://github.com/$owner/$repo"), connection = Some(VersionControlConnection.gitGit("github.com", s"$owner/$repo.git")), developerConnection = Some(VersionControlConnection.gitSsh("github.com", s":$owner/$repo.git", username = Some("git"))), tag = tag ) + def gitlab(owner: String, repo: String, tag: Option[String] = None): VersionControl = + VersionControl( + browsableRepository = Some(s"https://gitlab.com/$owner/$repo"), + connection = Some(VersionControlConnection.gitGit("gitlab.com", s"$owner/$repo.git")), + developerConnection = Some(VersionControlConnection.gitSsh("gitlab.com", s":$owner/$repo.git", username = Some("git"))), + tag = tag + ) } object VersionControlConnection { @@ -70,7 +77,7 @@ object VersionControlConnection { def gitGit(hostname: String, path: String = "", - port: Option[Int] = None): String = + port: Option[Int] = None): String = network("git", "git", hostname, path, port = port) def gitHttp(hostname: String, |