Skip to content

Commit

Permalink
#81: раздельные конфиги для хостов и режимов работы
Browse files Browse the repository at this point in the history
  • Loading branch information
sedovalx committed Jun 24, 2015
1 parent 2c7e2a5 commit 30143c7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sources/server/build.sbt
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import java.net.InetAddress
import java.nio.file.{Paths, Files}
import play.sbt.routes.RoutesKeys._
import sbt.Keys._

def getConfigName(testMode: Boolean): String = {
val host = InetAddress.getLocalHost
val hostName = host.getHostName
println("Host name is " + hostName)

val suffix = hostName + ".override.conf"
val suffix = "override."
val mode = if (testMode) "test." else ""

val searchList = Seq(
s"application.$mode$suffix",
s"application.$mode${suffix}conf",
s"application.${mode}conf"
) map { name => s"conf/$name" }

Expand Down

0 comments on commit 30143c7

Please sign in to comment.