Permalink
Browse files

Document :filespecs in sample project.clj.

  • Loading branch information...
1 parent 7f5e2b1 commit 03d6632169ab112c0f489a628a91f51de13f62a1 @technomancy technomancy committed Apr 3, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 sample.project.clj
View
14 sample.project.clj
@@ -148,6 +148,20 @@
:jar-exclusions [#"(?:^|/).svn/"]
;; Same thing, but for uberjars.
:uberjar-exclusions [#"META-INF/DUMMY.SF"]
+ ;; Add arbitrary jar entries. Supports :path, :paths, :bytes, and :fn types.
+ :filespecs [{:type :path :path "config/base.clj"}
+ ;; directory paths are included recursively
+ {:type :paths :paths ["config/web" "config/cli"]}
+ ;; programmatically-generated content can use :bytes
+ {:type :bytes :path "project.clj"
+ ;; strings or byte arrays are accepted
+ :bytes ~(slurp "project.clj")}
+ ;; :fn filespecs take the project as an argument and
+ ;; should return a filespec map of one of the other types.
+ {:type :fn :fn (fn [p]
+ {:type :bytes :path "git-log"
+ :bytes (:out (clojure.java.shell/sh
+ "git" "log" "-n" "1"))})}]
;; Set arbitrary key/value pairs for the jar's manifest.
:manifest {"Project-awesome-level" "super-great"}
;; You can set JVM-level options here.

0 comments on commit 03d6632

Please sign in to comment.