|
6 | 6 | [boot.util :as util]))
|
7 | 7 |
|
8 | 8 | (def ^:private deps
|
9 |
| - '[[com.amazonaws/aws-java-sdk-s3 "1.11.419"]]) |
| 9 | + '[[com.amazonaws/aws-java-sdk-s3 "1.11.723"]]) |
10 | 10 |
|
11 | 11 | (defn- warn-deps [deps]
|
12 | 12 | (let [conflict (delay (util/warn "Overriding project dependencies, using:\n"))]
|
|
24 | 24 |
|
25 | 25 | (boot/deftask spew
|
26 | 26 | [b bucket NAME str "AWS Bucket Identifier"
|
27 |
| - r region REGION str "AWS Region to connect through (the bucket is global)" |
| 27 | + r region REGION str "AWS Region." |
28 | 28 | a access-key ACCESS_KEY str "AWS Access Key"
|
29 | 29 | s secret-key SECRET_KEY str "AWS Secret Key"
|
30 | 30 | c canned-acl ACL kw "A keyword indicating which predefined ACL should be used"
|
|
33 | 33 | out (boot/tmp-dir!)
|
34 | 34 | opts (assoc *opts* :region (or region "us-east-1"))]
|
35 | 35 | (boot/with-pre-wrap fileset
|
36 |
| - (util/info "Spewing files into the %s bucket through region %s...\n" bucket (opts :region)) |
| 36 | + (util/info "Spewing files into the %s bucket in region %s...\n" bucket (opts :region)) |
37 | 37 | (let [src-files* (boot/output-files fileset)
|
38 | 38 | tgt-digests (pod/with-call-in pod
|
39 | 39 | (tailrecursion.boot-bucket.client/list-digests ~opts))
|
40 | 40 | src-files (remove #(some (fn [[p h]] (and (= (:path %) p) (= (:hash %) h))) tgt-digests) src-files*)
|
41 | 41 | fut-paths (atom [])]
|
42 | 42 | (when (empty? src-files) (util/info "■ no changed files to upload\n"))
|
43 | 43 | (doseq [{:keys [dir path]} src-files]
|
44 |
| - (->> (tailrecursion.boot-bucket.client/put-file! ~opts ~(.getPath dir) ~path) |
| 44 | + (->> (tailrecursion.boot-bucket.client/put-file! ~opts ~(.getPath dir) ~path |
45 | 45 | (pod/with-call-in pod)
|
46 | 46 | (future)
|
47 |
| - (swap! fut-paths conj))) |
| 47 | + (swap! fut-paths conj)))) |
48 | 48 | (doseq [fut-path @fut-paths]
|
49 | 49 | (util/info "• %s\n" @fut-path))
|
50 | 50 | (boot/add-meta fileset (into {} (mapv #(vector (:path %) {::uploaded true}) src-files)))))))
|
0 commit comments