Skip to content

Instantly share code, notes, and snippets.

@eishay
Created May 2, 2016 22:38
Show Gist options
  • Save eishay/9860846aed906c00c0cc74132db2bcb6 to your computer and use it in GitHub Desktop.
Save eishay/9860846aed906c00c0cc74132db2bcb6 to your computer and use it in GitHub Desktop.
lazy val currentVersion: ServiceVersion = current.mode match {
case Mode.Test = ServiceVersion("Test mode service")
case _ = ServiceVersion(io.Source.fromURL(Play.resource("app_version.txt").get).mkString)
}
lazy val compilationTime: DateTime = current.mode match {
case Mode.Test = currentDateTime
case _ =
val timeStr = io.Source.fromURL(Play.resource("app_compilation_date.txt").get).mkString
DateTimeFormat.forPattern("E, dd MMM yyyy HH:mm:ss Z")
.withLocale(Locale.ENGLISH)
.withZone(zones.PT).parseDateTime(timeStr)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment