]> njoseph.me Git - babashka-scripts.git/blobdiff - update-babashka.clj
Format all Clojure files using zprint
[babashka-scripts.git] / update-babashka.clj
index 1681e4db7f712ec31436cd86e720005ebeb501af..a449a7c3a5db5bab9cafbaeae74e34b3d649aff0 100755 (executable)
@@ -5,7 +5,8 @@
          '[babashka.curl :as curl]
          '[babashka.fs :as fs])
 
-(defn babashka-latest-version []
+(defn babashka-latest-version
+  []
   (-> (curl/get "https://api.github.com/repos/babashka/babashka/tags")
       :body
       (json/parse-string true)
 
 (defn download-binary
   [url destination]
-  (io/copy
-   (:body (curl/get url {:as :stream}))
-   (io/file destination)))
+  (io/copy (:body (curl/get url {:as :stream})) (io/file destination)))
 
 (defn get-download-url
   [version architecture]
-  (str "https://github.com/babashka/babashka/releases/download/v" version "/babashka-"
-        version "-" architecture ".zip"))
+  (str "https://github.com/babashka/babashka/releases/download/v"
+       version
+       "/babashka-"
+       version
+       "-"
+       architecture
+       ".zip"))
 
 (defn check-latest
   [version]
@@ -37,7 +41,8 @@
     (download-binary url output)))
 
 (when (= *file* (System/getProperty "babashka.file"))
-  (let [architecture "linux-static-amd64"  ;; TODO support multiple architectures
+  (let [architecture "linux-static-amd64"  ;; TODO support multiple
+                                           ;; architectures
         zip-file "babashka.zip"
         destination (expand-home "~/bin/bb")
         version (babashka-latest-version)]