Skip to content

Boot task for copying files from previous tasks to a specified directory (possibly external to the project).

License

Notifications You must be signed in to change notification settings

cpmcdaniel/boot-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojars Project

A simple copy task that allows boot builds to copy files from previous tasks into a specified directory.

[cpmcdaniel/boot-copy "2.0"] ;; latest release

Usage

The following examples assume you have boot installed and up to date.

Within a project

If you already have a build.boot, add the dependency above to :dependencies and (require '[cpmcdaniel/boot-copy :refer :all]). The build.boot file may look like the following:

(set-env!
 :source-paths   #{"src/main/java" "src/main/clojure"}
 :resource-paths #{"src/main/resources"}
 :dependencies   '[[cpmcdaniel/boot-copy "<version>" :scope "provided"]]) ;; latest version

(require '[cpmcdaniel.boot-copy :refer :all])

(task-options!
 copy {:output-dir    "/home/foo/backups"
       :include       #{#"\.jar$"}
       :exclude       #{#"\.bak$"}})

(deftask build
   "Build my project"
   []
   (comp (jar) (copy)))

The build can then be executed with boot build or:

boot jar copy -i '\.jar$' -o /home/foo/backups

TIP: try mixing this with the boot watch task to automatically move files when sources change, like so:

boot watch jar copy -i '\.jar$' -o /home/foo/backups

License

Copyright © 2020 Craig McDaniel

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Boot task for copying files from previous tasks to a specified directory (possibly external to the project).

Resources

License

Stars

Watchers

Forks

Packages

No packages published