Add auto-clean to deploy task. Fixes #1512.
This commit is contained in:
parent
7cd81ed78c
commit
4776eeb8e0
2 changed files with 7 additions and 0 deletions
|
@ -349,6 +349,10 @@
|
||||||
:jar-exclusions [#"(?:^|/).svn/"]
|
:jar-exclusions [#"(?:^|/).svn/"]
|
||||||
;; Same thing, but for uberjars.
|
;; Same thing, but for uberjars.
|
||||||
:uberjar-exclusions [#"META-INF/DUMMY.SF"]
|
:uberjar-exclusions [#"META-INF/DUMMY.SF"]
|
||||||
|
;; By default Leiningen will run a clean before deploying to prevent
|
||||||
|
;; undeclared AOT from leaking to downstream consumers; this disables
|
||||||
|
;; that behaviour.
|
||||||
|
:auto-clean false
|
||||||
;; Files to merge programmatically in uberjars when multiple same-named files
|
;; Files to merge programmatically in uberjars when multiple same-named files
|
||||||
;; exist across project and dependencies. Should be a map of filename strings
|
;; exist across project and dependencies. Should be a map of filename strings
|
||||||
;; or regular expressions to a sequence of three functions:
|
;; or regular expressions to a sequence of three functions:
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
[clojure.java.io :as io]
|
[clojure.java.io :as io]
|
||||||
[leiningen.pom :as pom]
|
[leiningen.pom :as pom]
|
||||||
[leiningen.jar :as jar]
|
[leiningen.jar :as jar]
|
||||||
|
[leiningen.clean :as clean]
|
||||||
[clojure.java.shell :as sh]
|
[clojure.java.shell :as sh]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
|
||||||
|
@ -158,6 +159,8 @@ be able to depend on jars that are deployed without a pom."
|
||||||
(apply main/abort "Can only deploy from branches listed in"
|
(apply main/abort "Can only deploy from branches listed in"
|
||||||
":deploy-branches:" branches)))
|
":deploy-branches:" branches)))
|
||||||
(warn-missing-metadata project)
|
(warn-missing-metadata project)
|
||||||
|
(when (:auto-clean project true)
|
||||||
|
(clean/clean project))
|
||||||
(let [repo (repo-for project repository)
|
(let [repo (repo-for project repository)
|
||||||
files (files-for project repo)]
|
files (files-for project repo)]
|
||||||
(try
|
(try
|
||||||
|
|
Loading…
Reference in a new issue