Last active
April 2, 2019 14:20
-
-
Save mangosmoothie/d1be573acf95fb68810c10058436cf23 to your computer and use it in GitHub Desktop.
clojure nested map destructuring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;input [:app :env config-{}] | |
(defn download-archive | |
[app env | |
{:keys [build-number build-name workdir] | |
{:keys [base-url archive-api archive-type archive-input-regex user pass]} :artifactory | |
{{{:keys [regex]} app} env} :deploy}] | |
(write-stream {:in (io/input-stream | |
(get-archive-response-body | |
{:uname user | |
:pass pass | |
:uri (str base-url archive-api) | |
:build-number build-number | |
:build-name build-name | |
:archive-type archive-type | |
:regex (str regex archive-input-regex)})) | |
:location workdir | |
:name (str build-name "-" build-number "." (name archive-type))})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment