Skip to content

Commit

Permalink
Restructured githubPublishTo to avoid cyclic reference
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed May 30, 2020
1 parent de7e743 commit 8b90f56
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/scala/sbtghpackages/GitHubPackagesPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ object GitHubPackagesPlugin extends AutoPlugin {
})

val packagePublishSettings = Seq(
publishTo := githubPublishTo.value,
githubPublishTo := {
val suppress = githubSuppressPublicationWarning.value
val log = streams.value.log
val ms = publishMavenStyle.value
val back = for {
Expand All @@ -71,7 +69,14 @@ object GitHubPackagesPlugin extends AutoPlugin {
}
}

back orElse {
back
},

publishTo := {
val suppress = githubSuppressPublicationWarning.value
val log = streams.value.log

githubPublishTo.value orElse {
GitHubPackagesPlugin synchronized {
if (!alreadyWarned && !suppress) {
log.warn("undefined keys `githubOwner` and `githubRepository`")
Expand Down

0 comments on commit 8b90f56

Please sign in to comment.