Skip to content

Commit 190c055

Browse files
committed
Distingiush highlighting for lib test deps
I spit out deps for lib tests, its nice to easily eyeball that I am testing with the versions of clojure, clojurescript and rewrite-clj that I intend to. To make it easier to focus on what I am interested in, I highlight deps of interest. Now highlighting rewrite-clj and clojure deps with different colours.
1 parent a100ad3 commit 190c055

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

script/libs_tests.clj

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,24 @@
6161
(shcmd ["unzip" target "-d" target-root-dir])
6262
(str (fs/file target-root-dir zip-root-dir)))))
6363

64+
(defn- print-deps [deps-out]
65+
(-> deps-out
66+
(string/replace #"(org.clojure/clojurescript|org.clojure/clojure)"
67+
(-> "$1"
68+
ansi/bold-yellow-bg
69+
ansi/black))
70+
(string/replace #"(rewrite-cljc|rewrite-cljs|rewrite-clj)"
71+
(-> "$1"
72+
ansi/bold-green-bg
73+
ansi/black))
74+
(println)))
75+
6476
(defn- deps-tree [{:keys [home-dir]} cmd]
6577
(let [{:keys [out err]} (shcmd cmd {:dir home-dir
6678
:out :string
6779
:err :string})]
6880
(-> (format "stderr->:\n%s\nstdout->:\n%s" err out)
69-
(string/replace #"(rewrite-cljs|rewrite-clj|org.clojure/clojurescript|org.clojure/clojure)"
70-
(-> "$1"
71-
ansi/bold-yellow-bg
72-
ansi/black))
73-
(println))))
81+
print-deps)))
7482

7583
(defn- lein-deps-tree [lib]
7684
(deps-tree lib ["lein" "deps" ":tree"]))

0 commit comments

Comments
 (0)