Fix deploy task to work with signature files.
This commit is contained in:
parent
e7eb5a7b3f
commit
4ce8774d1a
1 changed files with 10 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
[leiningen.jar :as jar]
|
[leiningen.jar :as jar]
|
||||||
[leiningen.clean :as clean]
|
[leiningen.clean :as clean]
|
||||||
[clojure.java.shell :as sh]
|
[clojure.java.shell :as sh]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as string]))
|
||||||
|
|
||||||
(defn- abort-message [message]
|
(defn- abort-message [message]
|
||||||
(cond (re-find #"Return code is 405" message)
|
(cond (re-find #"Return code is 405" message)
|
||||||
|
@ -122,10 +122,17 @@
|
||||||
(-> (sh/sh "git" "rev-parse" "--abbrev-ref" "HEAD")
|
(-> (sh/sh "git" "rev-parse" "--abbrev-ref" "HEAD")
|
||||||
:out
|
:out
|
||||||
butlast
|
butlast
|
||||||
str/join
|
string/join
|
||||||
branches
|
branches
|
||||||
not))
|
not))
|
||||||
|
|
||||||
|
(defn- extension [f]
|
||||||
|
(if-let [[_ signed-extension] (re-find #"\.([a-z]+\.asc)$" f)]
|
||||||
|
signed-extension
|
||||||
|
(if (= "pom.xml" (.getName (io/file f)))
|
||||||
|
"pom"
|
||||||
|
(last (.split f "\\.")))))
|
||||||
|
|
||||||
(defn ^:no-project-needed deploy
|
(defn ^:no-project-needed deploy
|
||||||
"Deploy jar and pom to remote repository.
|
"Deploy jar and pom to remote repository.
|
||||||
|
|
||||||
|
@ -181,8 +188,7 @@ be able to depend on jars that are deployed without a pom."
|
||||||
group-id (namespace identifier)
|
group-id (namespace identifier)
|
||||||
repo (repo-for project repository)
|
repo (repo-for project repository)
|
||||||
artifacts (for [f files]
|
artifacts (for [f files]
|
||||||
[[:extension (if (= "pom.xml" (.getName (io/file f)))
|
[[:extension (extension f)] f])]
|
||||||
"pom" (last (.split f "\\.")))] f])]
|
|
||||||
(main/debug "Deploying" files "to" repo)
|
(main/debug "Deploying" files "to" repo)
|
||||||
(aether/deploy
|
(aether/deploy
|
||||||
:coordinates [(symbol group-id artifact-id) version]
|
:coordinates [(symbol group-id artifact-id) version]
|
||||||
|
|
Loading…
Reference in a new issue