Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rsslldnphy committed Oct 19, 2016
1 parent decc7f1 commit 4a587ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(defproject lein-docker-compose "0.1.1"
(defproject lein-docker-compose "0.1.2-SNAPSHOT"
:description "Leiningen plugin that provides environ with docker-compose port mappings"
:url "https://github.com/rsslldnphy/lein-docker-compose"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[circleci/clj-yaml "0.5.5"]
:dependencies [[io.forward/yaml "1.0.4"]
[lein-environ "1.1.0"]]
:profiles {:dev {:resource-paths ["test/resources"]}}
:eval-in-leiningen true)
10 changes: 1 addition & 9 deletions src/lein_docker_compose/plugin.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns lein-docker-compose.plugin
(:use [robert.hooke :only (add-hook)])
(:require [clj-yaml.core :as yaml]
(:require [yaml.core :as yaml]
[clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.string :as s]
Expand Down Expand Up @@ -42,16 +42,8 @@
(map (juxt config-key discover-port-mapping))
(into {}))))

(defn start-services!
[]
(let [output (sh/sh "docker-compose" "up" "-d")]
(println (:out output))
(when-not (zero? (:exit output))
(println "WARNING: Failed to bring up docker-compose services"))))

(defn merge-docker-env-vars
[func project]
(start-services!)
(merge (func project)
(discover-docker-ports project)))

Expand Down
2 changes: 1 addition & 1 deletion test/lein_docker_compose/plugin_test.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns lein-docker-compose.plugin-test
(:require [clojure.test :refer :all]
[clj-yaml.core :as yaml]
[yaml.core :as yaml]
[clojure.java.io :as io]
[clojure.string :as s]
[lein-docker-compose.plugin :as l]))
Expand Down

0 comments on commit 4a587ed

Please sign in to comment.