Skip to content

Instantly share code, notes, and snippets.

Created June 25, 2015 14:26
What would you like to do?
(deftask s3cmd
"Sync frontend with S3 bucket."
[b bucket-name NAME str "Name of the bucket to sync to."]
(assert bucket-name "bucket-name is a required argument.")
(let [tmp (temp-dir!)
path (str (.getPath tmp) "/")
(with-pre-wrap fs
(with-let [fs fs]
(apply sync! tmp (->> fs output-dirs))
(dosh "s3cmd"
"--access_key" ACCESS
"--secret_key" SECRET
"sync" path (format "s3://%s" bucket-name))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment