Skip to content

Commit

Permalink
Add credentials options to push task.
Browse files Browse the repository at this point in the history
  • Loading branch information
kul committed Jun 30, 2015
1 parent 32a4da7 commit 45af09d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion boot/core/src/boot/task/built_in.clj
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@

[f file PATH str "The jar file to deploy."
F file-regex MATCH #{regex} "The set of regexes of paths to deploy."
c credentials PATH str "The path to credentials file for repositores."
g gpg-sign bool "Sign jar using GPG private key."
k gpg-user-id NAME str "The name used to find the GPG key."
K gpg-keyring PATH str "The path to secring.gpg file to use for signing."
Expand All @@ -711,7 +712,12 @@
((if (seq file-regex) #(core/by-re file-regex %) identity))
(map core/tmp-file)))
repo-map (->> (core/get-env :repositories) (into {}))
r (get repo-map repo)]
r (get repo-map repo)
r (if (and r credentials)
(->> credentials slurp read-string
(some (fn [[k v]] (when (or (= k (:url r)) (re-find k (:url r))) v)))
(merge r))
r)]
(when-not (and r (seq jarfiles))
(throw (Exception. "missing jar file or repo not found")))
(doseq [f jarfiles]
Expand Down

0 comments on commit 45af09d

Please sign in to comment.