Skip to content

Commit

Permalink
Use the new version checker utility
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren authored and raboof committed Sep 20, 2018
1 parent d607e54 commit 77a046a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class HttpExt private[http] (private val config: Config)(implicit val system: Ex
with DefaultSSLContextCreation {

akka.http.Version.check(system.settings.config)
akka.AkkaVersion.require("akka-http", akka.http.Version.supportedAkkaVersion)

import Http._

Expand Down
3 changes: 2 additions & 1 deletion project/VersionGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ object VersionGenerator {
|
|object Version {
| val current: String = "%s"
| val supportedAkkaVersion = "%s"
| def check(config: Config): Unit = {
| val configVersion = config.getString("akka.http.version")
| if (configVersion != current) {
Expand All @@ -37,7 +38,7 @@ object VersionGenerator {

def generateVersion(dir: SettingKey[File], locate: File => File, template: String) = Def.task[Seq[File]] {
val file = locate(dir.value)
val content = template.stripMargin.format(version.value)
val content = template.stripMargin.format(version.value, Dependencies.akkaVersion.value)
if (!file.exists || IO.read(file) != content) IO.write(file, content)
Seq(file)
}
Expand Down

0 comments on commit 77a046a

Please sign in to comment.