Skip to content

Commit

Permalink
Added default repo (since that appears to work)
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Mar 3, 2020
1 parent c6aad11 commit e802d48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/sbtghpackages/GitHubPackagesPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object GitHubPackagesPlugin extends AutoPlugin {
val TokenSource = sbtghpackages.TokenSource

implicit class GHPackagesResolverSyntax(val resolver: Resolver.type) extends AnyVal {
def githubPackages(owner: String, repo: String): MavenRepository =
def githubPackages(owner: String, repo: String = "_"): MavenRepository =
realm(owner, repo) at s"https://maven.pkg.github.com/$owner/$repo"
}
}
Expand Down Expand Up @@ -127,7 +127,7 @@ object GitHubPackagesPlugin extends AutoPlugin {
}

private def realm(owner: String, repo: String) =
s"GitHub Package Registry ($owner/$repo)"
s"GitHub Package Registry (${owner}${if (repo != "_") s"/$repo" else ""})"

override def projectSettings = packagePublishSettings
}
2 changes: 0 additions & 2 deletions src/sbt-test/sbtghpackages/publish/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ lazy val publisher = project
lazy val resolver = project
.in(file("resolver"))
.settings(
resolvers += Resolver.githubPackages(githubOwner.value, githubRepository.value),

libraryDependencies += "com.codecommit" %% ArtifactId % version.value)

0 comments on commit e802d48

Please sign in to comment.