Skip to content

Commit

Permalink
Fix to ignore deps which has local/root opt #33
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Oct 8, 2020
1 parent 3da7f80 commit f15a58e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/antq/dep/clojure.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

(def ^:private project-file "deps.edn")

(defn- ignore? [opt]
(contains? opt :local/root))

(defmulti extract-type-and-version
(fn [opt]
(or (and (:mvn/version opt) :java)
Expand All @@ -34,7 +37,8 @@
(swap! deps merge (second form)))
form)
edn)
(for [[dep-name opt] @deps]
(for [[dep-name opt] @deps
:when (not (ignore? opt))]
(-> {:file project-file
:name (if (qualified-symbol? dep-name)
(str dep-name)
Expand Down
4 changes: 3 additions & 1 deletion test/resources/dep/deps.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{:deps {foo/core {:mvn/version "1.0.0"}
bar {:mvn/version "2.0.0"}
git/hello {:git/url "https://github.com/example/hello.git"
:sha "dummy-sha"}}
:sha "dummy-sha"}
;; local/root should be ignored
local-repo/local-repo {:local/root "/path/to/local/repo"}}

:aliases
{:foo {:extra-deps {baz {:mvn/version "3.0.0"}}}}
Expand Down

0 comments on commit f15a58e

Please sign in to comment.