File tree Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Boot task `spew` for spewing output files into an s3 bucket.
4
4
5
5
[ ] ( dependency )
6
6
``` clojure
7
- [tailrecursion/boot-bucket " 1.0 .0" ] ; ; latest release
7
+ [tailrecursion/boot-bucket " 1.1 .0" ] ; ; latest release
8
8
```
9
9
[ ] ( /dependency )
10
10
Original file line number Diff line number Diff line change 6
6
(require
7
7
'[adzerk.bootlaces :refer :all ])
8
8
9
- (def +version+ " 1.0 .0" )
9
+ (def +version+ " 1.1 .0" )
10
10
11
11
(bootlaces! +version+)
12
12
Original file line number Diff line number Diff line change 34
34
(let [src-files* (boot/output-files fileset)
35
35
tgt-digests (pod/with-call-in pod
36
36
(tailrecursion.boot-bucket.client/list-digests ~*opts*))
37
- src-files (remove #(some (fn [[p h]] (and (= (:path %) p) (= (:hash %) h))) tgt-digests) src-files*)]
38
- (if (empty? src-files)
39
- (util/info " ■ no changed files to upload\n " )
40
- (do
41
- (doseq [{:keys [dir path]} src-files]
42
- (util/info " • %s\n " path)
43
- (pod/with-call-in pod
44
- (tailrecursion.boot-bucket.client/put-file! ~*opts* ~(.getPath dir) ~path)))
45
- (boot/add-meta fileset (into {} (mapv #(vector (:path %) {::uploaded true }) src-files)))))))))
37
+ src-files (remove #(some (fn [[p h]] (and (= (:path %) p) (= (:hash %) h))) tgt-digests) src-files*)
38
+ fut-paths (atom [])]
39
+ (when (empty? src-files) (util/info " ■ no changed files to upload\n " ))
40
+ (doseq [{:keys [dir path]} src-files]
41
+ (->> (tailrecursion.boot-bucket.client/put-file! ~*opts* ~(.getPath dir) ~path)
42
+ (pod/with-call-in pod)
43
+ (future )
44
+ (swap! fut-paths conj)))
45
+ (doseq [fut-path @fut-paths]
46
+ (util/info " • %s\n " @fut-path))
47
+ (boot/add-meta fileset (into {} (mapv #(vector (:path %) {::uploaded true }) src-files)))))))
Original file line number Diff line number Diff line change 41
41
(defn put-file! [{:keys [access-key secret-key bucket metadata]} base-dir path]
42
42
(let [client @(client access-key secret-key)
43
43
req (request bucket base-dir path metadata)]
44
- (.putObject client req)))
44
+ (.putObject client req)
45
+ path))
You can’t perform that action at this time.
0 commit comments