Skip to content

Commit

Permalink
Use file instead of env variable for bintray credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Obedin committed Jul 21, 2015
1 parent cd7e59f commit 1b60e47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/out
target
project/target
.credentials
16 changes: 4 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import bintray._
import bintray.Keys._

def newProject(projectName: String): Project = {
val proj = Project(projectName, file(projectName))
def newProject(projectName: String): Project =
Project(projectName, file(projectName))
.settings(
name := "sbt-structure-" + projectName,
organization := "org.jetbrains",
Expand All @@ -14,17 +14,9 @@ def newProject(projectName: String): Project = {
.settings(bintrayPublishSettings:_*)
.settings(
repository in bintray := "sbt-plugins",
bintrayOrganization in bintray := Some("jetbrains")
bintrayOrganization in bintray := Some("jetbrains"),
credentialsFile in bintray := file(".credentials")
)
val username = System.getenv("BINTRAY_USERNAME")
val apikey = System.getenv("BINTRAY_APIKEY")
if (username == null || apikey == null)
proj
else
proj.settings(
ensureCredentials := BintrayCredentials(username, apikey)
)
}

val core = newProject("core")
.settings(
Expand Down

0 comments on commit 1b60e47

Please sign in to comment.