aboutsummaryrefslogtreecommitdiff
path: root/lux-lein/src
diff options
context:
space:
mode:
authorEduardo Julian2019-03-13 20:13:50 -0400
committerEduardo Julian2019-03-13 20:13:50 -0400
commit2a66e82a230e54fd07fd911bd4b220d54f0f0401 (patch)
treed52e71df3c5ab857f013d3f3b9359da8643a84d8 /lux-lein/src
parentd98d1cb26f8cd3aa49f9c1e9f461ae0ee176df7c (diff)
No longer packaging Clojure or Lux source-code by accident.
Diffstat (limited to 'lux-lein/src')
-rw-r--r--lux-lein/src/leiningen/lux/packager.clj8
1 files changed, 5 insertions, 3 deletions
diff --git a/lux-lein/src/leiningen/lux/packager.clj b/lux-lein/src/leiningen/lux/packager.clj
index 52db5e5a0..2c23c5cc3 100644
--- a/lux-lein/src/leiningen/lux/packager.clj
+++ b/lux-lein/src/leiningen/lux/packager.clj
@@ -92,6 +92,8 @@
(recur (.read is buffer 0 buffer-size)))))
(.toByteArray os)))))
+(def excluded-extensions-re #"\.(lux|clj[cs]?)$")
+
(defn ^:private add-jar! [^File jar-file project !all-jar-files]
(with-open [is (->> jar-file (new FileInputStream) (new JarInputStream))]
(loop [^JarEntry entry (.getNextJarEntry is)]
@@ -101,7 +103,8 @@
(not (.startsWith entry-name "META-INF/maven/"))
(not (some (fn [exclusion]
(re-find exclusion entry-name))
- (get project :uberjar-exclusions))))
+ (get project :uberjar-exclusions)))
+ (not (re-find excluded-extensions-re entry-name)))
(let [entry-data (read-stream is)
entry-data (or (some (fn [[pattern [read fuse write]]]
(let [matches? (if (string? pattern)
@@ -225,5 +228,4 @@
[project platform module resources-dirs]
(case platform
"jvm" (package-jvm project module resources-dirs)
- "js" nil)
- )
+ "js" nil))