Skip to content

Commit

Permalink
Made scmInfo and homepage fallback on previous values
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Mar 16, 2020
1 parent d99422b commit d3ed869
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/scala/sbtghpackages/GitHubPackagesPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,21 @@ object GitHubPackagesPlugin extends AutoPlugin {
resolvers ++= githubOwner.?.value.toSeq.map(Resolver.githubPackages(_)),

scmInfo := {
for {
val back = for {
owner <- githubOwner.?.value
repo <- githubRepository.?.value
} yield ScmInfo(url(s"https://github.com/$owner/$repo"), s"scm:git@github.com:$owner/$repo.git")

back.orElse(scmInfo.value)
},

homepage := {
for {
val back = for {
owner <- githubOwner.?.value
repo <- githubRepository.?.value
} yield url(s"https://github.com/$owner/$repo")

back.orElse(homepage.value)
},

pomIncludeRepository := (_ => false),
Expand Down

0 comments on commit d3ed869

Please sign in to comment.