Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add credentials options to push task. #239

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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