Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #136 from 2m/wip-error-on-missing-creds
Browse files Browse the repository at this point in the history
#124 Do not log when missing credentials
  • Loading branch information
dwijnand committed Dec 5, 2017
2 parents 04ed5f8 + a5ce65a commit bf98e21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 0 additions & 7 deletions src/main/scala/Bintray.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ object Bintray {
propsCredentials
.orElse(envCredentials)
.orElse(BintrayCredentials.read(credsFile))
.orElse {
log.warn(s"Missing bintray credentials. " +
s"Either create a credentials file with the bintrayChangeCredentials task, " +
s"set the BINTRAY_USER and BINTRAY_PASS environment variables or " +
s"pass bintray.user and bintray.pass properties to sbt.")
None
}

private def propsCredentials =
for {
Expand Down
7 changes: 6 additions & 1 deletion src/main/scala/BintrayPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ object BintrayPlugin extends AutoPlugin {
Bintray.ensureLicenses(licenses.value, bintrayOmitLicense.value)
},
bintrayEnsureCredentials := {
Bintray.ensuredCredentials(bintrayCredentialsFile.value, streams.value.log).get
Bintray.ensuredCredentials(bintrayCredentialsFile.value, streams.value.log).getOrElse {
sys.error(s"Missing bintray credentials. " +
s"Either create a credentials file with the bintrayChangeCredentials task, " +
s"set the BINTRAY_USER and BINTRAY_PASS environment variables or " +
s"pass bintray.user and bintray.pass properties to sbt.")
}
},
bintrayEnsureBintrayPackageExists := ensurePackageTask.value,
bintrayUnpublish := Def.task {
Expand Down

0 comments on commit bf98e21

Please sign in to comment.