Add os & arch to pod paths
This commit is contained in:
parent
fb52307f60
commit
4b3a5a2afa
1 changed files with 12 additions and 4 deletions
|
|
@ -15,10 +15,14 @@
|
||||||
"x86_64"
|
"x86_64"
|
||||||
arch))
|
arch))
|
||||||
|
|
||||||
|
(defn normalize-os [os]
|
||||||
|
(-> os str/lower-case (str/replace #"\s+" "_")))
|
||||||
|
|
||||||
(def os
|
(def os
|
||||||
(delay
|
(delay
|
||||||
{:os/name (or (System/getenv "OS_NAME") (System/getProperty "os.name"))
|
{:os/name (or (System/getenv "BABASHKA_PODS_OS_NAME")
|
||||||
:os/arch (let [arch (or (System/getenv "OS_ARCH")
|
(System/getProperty "os.name"))
|
||||||
|
:os/arch (let [arch (or (System/getenv "BABASHKA_PODS_OS_ARCH")
|
||||||
(System/getProperty "os.arch"))]
|
(System/getProperty "os.arch"))]
|
||||||
(normalize-arch arch))}))
|
(normalize-arch arch))}))
|
||||||
|
|
||||||
|
|
@ -151,7 +155,9 @@
|
||||||
(io/file base-file
|
(io/file base-file
|
||||||
"repository"
|
"repository"
|
||||||
(str pod-name)
|
(str pod-name)
|
||||||
pod-version)))
|
pod-version
|
||||||
|
(normalize-os (:os/name @os))
|
||||||
|
(:os/arch @os))))
|
||||||
|
|
||||||
(defn data-dir
|
(defn data-dir
|
||||||
^java.io.File
|
^java.io.File
|
||||||
|
|
@ -159,7 +165,9 @@
|
||||||
pod-version :pod/version}]
|
pod-version :pod/version}]
|
||||||
(io/file @pods-repo-dir
|
(io/file @pods-repo-dir
|
||||||
(str pod-name)
|
(str pod-name)
|
||||||
pod-version))
|
pod-version
|
||||||
|
(normalize-os (:os/name @os))
|
||||||
|
(:os/arch @os)))
|
||||||
|
|
||||||
(defn sha256 [file]
|
(defn sha256 [file]
|
||||||
(let [buf (byte-array 8192)
|
(let [buf (byte-array 8192)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue