Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
add-at, take 1
;; non-working add-at
(require '[boot.core :as core]
'[boot.tmpdir :as tmpd]
'[ :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
(#'core/get-add-dir fileset #{rolekey})
(boot (add-at :rolekey :asset
:source (io/file "foo")
:dest (io/file "bar"))
;; 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