Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add-at, take 1
;; non-working add-at
(require '[boot.core :as core]
'[boot.tmpdir :as tmpd]
'[clojure.java.io :as io])
(deftask add-at
"Like sift :add-*, but lets you make a dest path in fileset"
[r rolekey ROLEKEY kw "rolekey"
s source SOURCE file "source path in project"
d dest DEST file "dest path in fileset"]
(fn [next-task]
(fn [fileset]
(next-task (tmpd/add fileset
(io/file
(#'core/get-add-dir fileset #{rolekey})
dest)
source
nil)))))
(boot (add-at :rolekey :asset
:source (io/file "foo")
:dest (io/file "bar"))
(target))
;; AssertionError Assert failed: dest-dir not in dir set (/Users/stu/.boot/cache/tmp/meta/datomic-dev/jcp/-rcsl8f/bar)
;; ((set (map file dirs)) dest-dir) boot.tmpdir.TmpFileSet (tmpdir.clj:276)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.