-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.clj
More file actions
27 lines (21 loc) · 895 Bytes
/
usage.clj
File metadata and controls
27 lines (21 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(ns deps.tools.usage
(:require
[clojure.data :as clojure.data]
[deps.tools :as deps.tools]))
;; modify [[deps.config.example.edn]] to point to local `tools.deps` projects
(def config (deps.tools/slurp-config "deps.config.example.edn"))
(def lib 'deps/tools)
(def info (deps.tools/info config))
(clojure.data/diff
(::deps.tools/deps-map (info lib))
(::deps.tools/clean-deps-map (info lib)))
;; replace `lib`'s `:deps.tools/deps-map` in info with a localized version
(def localized (deps.tools/localize info lib))
(clojure.data/diff
(::deps.tools/deps-map (localized lib))
(::deps.tools/clean-deps-map (localized lib)))
;; traverse `lib`'s dependency tree as in `deps.tools/update!`
;; without side effects, optionally adding commit messages
(deps.tools/plan info lib)
;; post-order update each dependency with the latest SHAs
(deps.tools/update! info lib)