Allow env vars OS_NAME & OS_ARCH to override os props

This is helpful when caching pods in an artifact for deployment to another OS/arch than the one we're building on.
This commit is contained in:
Wes Morgan 2022-09-06 13:22:38 -06:00
parent 6df443fabf
commit 8c70709927
No known key found for this signature in database
GPG key ID: 5639E4CBFA17DC84

View file

@ -15,8 +15,9 @@
"x86_64"
arch))
(def os {:os/name (System/getProperty "os.name")
:os/arch (let [arch (System/getProperty "os.arch")]
(def os {:os/name (or (System/getenv "OS_NAME") (System/getProperty "os.name"))
:os/arch (let [arch (or (System/getenv "OS_ARCH")
(System/getProperty "os.arch"))]
(normalize-arch arch))})
(defn warn [& strs]