From af21f71a6e95b3506cf435af3686ebf9985e050c Mon Sep 17 00:00:00 2001 From: Derek Wickern Date: Fri, 27 Oct 2017 08:04:25 -0700 Subject: [PATCH] convert dockerVersion from a setting to a task (#1058) --- .../sbt/packager/docker/DockerSpotifyClientPlugin.scala | 2 +- src/main/scala/com/typesafe/sbt/packager/docker/Keys.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com/typesafe/sbt/packager/docker/DockerSpotifyClientPlugin.scala b/src/main/scala/com/typesafe/sbt/packager/docker/DockerSpotifyClientPlugin.scala index 819a96455..e36216e9b 100644 --- a/src/main/scala/com/typesafe/sbt/packager/docker/DockerSpotifyClientPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/packager/docker/DockerSpotifyClientPlugin.scala @@ -84,7 +84,7 @@ object DockerSpotifyClientPlugin extends AutoPlugin { } } - def dockerServerVersion: Def.Initialize[Option[DockerVersion]] = Def.setting { + def dockerServerVersion: Def.Initialize[Task[Option[DockerVersion]]] = Def.task { val docker: DockerClient = DefaultDockerClient.fromEnv().build() DockerVersion.parse(docker.version().version()) } diff --git a/src/main/scala/com/typesafe/sbt/packager/docker/Keys.scala b/src/main/scala/com/typesafe/sbt/packager/docker/Keys.scala index 5b2e47d15..b47def354 100644 --- a/src/main/scala/com/typesafe/sbt/packager/docker/Keys.scala +++ b/src/main/scala/com/typesafe/sbt/packager/docker/Keys.scala @@ -29,7 +29,7 @@ trait DockerKeys { "Docker CMD. Used together with dockerEntrypoint. Arguments passed in exec form" ) val dockerExecCommand = SettingKey[Seq[String]]("dockerExecCommand", "The shell command used to exec Docker") - val dockerVersion = SettingKey[Option[DockerVersion]]("dockerVersion", "The docker server version") + val dockerVersion = TaskKey[Option[DockerVersion]]("dockerVersion", "The docker server version") val dockerBuildOptions = SettingKey[Seq[String]]("dockerBuildOptions", "Options used for the Docker build") val dockerBuildCommand = SettingKey[Seq[String]]("dockerBuildCommand", "Command for building the Docker image") val dockerLabels = SettingKey[Map[String, String]]("dockerLabels", "Labels applied to the Docker image")