Bump deps.clj (#1556)
This commit is contained in:
parent
555c11eca2
commit
2e3bd2d3f0
7 changed files with 40 additions and 38 deletions
|
|
@ -81,7 +81,8 @@
|
||||||
:environment {:LEIN_ROOT "true"
|
:environment {:LEIN_ROOT "true"
|
||||||
:BABASHKA_PLATFORM "linux"
|
:BABASHKA_PLATFORM "linux"
|
||||||
:GRAALVM_VERSION "22.3.1"
|
:GRAALVM_VERSION "22.3.1"
|
||||||
:GRAALVM_HOME graalvm-home}
|
:GRAALVM_HOME graalvm-home
|
||||||
|
:BABASHKA_TEST_ENV "jvm"}
|
||||||
:resource_class "large"
|
:resource_class "large"
|
||||||
:steps
|
:steps
|
||||||
(gen-steps
|
(gen-steps
|
||||||
|
|
|
||||||
2
deps.clj
2
deps.clj
|
|
@ -1 +1 @@
|
||||||
Subproject commit 564f97f75f95c1bfd8a606c97066df7015b19ffc
|
Subproject commit 647d40a7e682fdd225ed342825b3ea14a7c5f780
|
||||||
2
process
2
process
|
|
@ -1 +1 @@
|
||||||
Subproject commit 84919a6bad41fc1d0e3f045cc54aab6174bbf4b5
|
Subproject commit b23db511af22e9b0572bf6d032b1fe75bf9f00a1
|
||||||
|
|
@ -38,17 +38,13 @@
|
||||||
*out* @sci/out
|
*out* @sci/out
|
||||||
*err* @sci/err
|
*err* @sci/err
|
||||||
deps/*dir* (:dir opts)
|
deps/*dir* (:dir opts)
|
||||||
deps/*env* (:env opts)
|
deps/*aux-process-fn* (fn [{:keys [cmd out]}]
|
||||||
deps/*extra-env* (:extra-env opts)
|
(pp/shell (assoc opts :out out :cmd cmd)))
|
||||||
deps/*process-fn* (fn
|
deps/*clojure-process-fn* (fn [{:keys [cmd]}]
|
||||||
([cmd] (pp/process* {:cmd cmd
|
(pp/process* {:cmd cmd
|
||||||
:prev prev
|
:prev prev
|
||||||
:opts opts}))
|
:opts opts}))
|
||||||
([cmd _] (pp/process* {:cmd cmd
|
deps/*exit-fn* (fn [{:keys [message]}]
|
||||||
:prev prev
|
(when message
|
||||||
:opts opts})))
|
(throw (Exception. message))))]
|
||||||
deps/*exit-fn* (fn
|
|
||||||
([_])
|
|
||||||
([_exit-code msg]
|
|
||||||
(throw (Exception. msg))))]
|
|
||||||
(apply deps/-main cmd))))
|
(apply deps/-main cmd))))
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
[babashka.fs :as fs]
|
[babashka.fs :as fs]
|
||||||
[babashka.impl.classpath :as cp]
|
[babashka.impl.classpath :as cp]
|
||||||
[babashka.impl.common :refer [bb-edn]]
|
[babashka.impl.common :refer [bb-edn]]
|
||||||
|
[babashka.process :as process]
|
||||||
[borkdude.deps :as deps]
|
[borkdude.deps :as deps]
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[sci.core :as sci]))
|
[sci.core :as sci]))
|
||||||
|
|
@ -80,8 +81,8 @@
|
||||||
(let [deps-map (assoc-in deps-map [:aliases :org.babashka/defaults]
|
(let [deps-map (assoc-in deps-map [:aliases :org.babashka/defaults]
|
||||||
{:replace-paths [] ;; babashka sets paths manually
|
{:replace-paths [] ;; babashka sets paths manually
|
||||||
:classpath-overrides (cond->
|
:classpath-overrides (cond->
|
||||||
'{org.clojure/clojure ""
|
'{org.clojure/clojure ""
|
||||||
org.clojure/spec.alpha ""}
|
org.clojure/spec.alpha ""}
|
||||||
;; only remove core specs when they are not mentioned in deps map
|
;; only remove core specs when they are not mentioned in deps map
|
||||||
(not (str/includes? (str deps-map) "org.clojure/core.specs.alpha"))
|
(not (str/includes? (str deps-map) "org.clojure/core.specs.alpha"))
|
||||||
(assoc 'org.clojure/core.specs.alpha ""))})
|
(assoc 'org.clojure/core.specs.alpha ""))})
|
||||||
|
|
@ -91,12 +92,16 @@
|
||||||
args (if force (cons "-Sforce" args) args)
|
args (if force (cons "-Sforce" args) args)
|
||||||
args (concat args [(str "-A:" (str/join ":" (cons ":org.babashka/defaults" aliases)))])
|
args (concat args [(str "-A:" (str/join ":" (cons ":org.babashka/defaults" aliases)))])
|
||||||
bindings (cond->
|
bindings (cond->
|
||||||
{#'deps/*env* env
|
{#'deps/*aux-process-fn* (fn [{:keys [cmd out]}]
|
||||||
#'deps/*extra-env* extra-env
|
(process/shell
|
||||||
#'deps/*exit-fn* (fn
|
{:cmd cmd
|
||||||
([_])
|
:out out
|
||||||
([_exit-code msg]
|
:env env
|
||||||
(throw (Exception. msg))))}
|
:dir (when deps-root (str deps-root))
|
||||||
|
:extra-env extra-env}))
|
||||||
|
#'deps/*exit-fn* (fn [{:keys [message]}]
|
||||||
|
(when message
|
||||||
|
(throw (Exception. message))))}
|
||||||
deps-root (assoc #'deps/*dir* (str deps-root)))
|
deps-root (assoc #'deps/*dir* (str deps-root)))
|
||||||
cp (with-out-str (with-bindings bindings
|
cp (with-out-str (with-bindings bindings
|
||||||
(apply deps/-main args)))
|
(apply deps/-main args)))
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
'babashka/babashka.curl {:mvn/version "0.1.2"}
|
'babashka/babashka.curl {:mvn/version "0.1.2"}
|
||||||
'babashka/babashka.core {:git/url "https://github.com/babashka/babashka.core"
|
'babashka/babashka.core {:git/url "https://github.com/babashka/babashka.core"
|
||||||
:git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"}
|
:git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"}
|
||||||
'babashka/process {:mvn/version "0.5.17"})
|
'babashka/process {:mvn/version "0.5.19"})
|
||||||
deps (dissoc deps
|
deps (dissoc deps
|
||||||
'borkdude/sci
|
'borkdude/sci
|
||||||
'org.babashka/sci
|
'org.babashka/sci
|
||||||
|
|
|
||||||
|
|
@ -106,21 +106,21 @@ true
|
||||||
(is (fs/exists? libs-dir2))))))
|
(is (fs/exists? libs-dir2))))))
|
||||||
|
|
||||||
(deftest ^:windows-only win-clojure-test
|
(deftest ^:windows-only win-clojure-test
|
||||||
(testing "GITLIBS can set location of .gitlibs dir"
|
(testing "GITLIBS can set location of .gitlibs dir"
|
||||||
(let [tmp-dir (fs/create-temp-dir)
|
(let [tmp-dir (fs/create-temp-dir)
|
||||||
libs-dir (fs/file tmp-dir ".gitlibs")
|
libs-dir (fs/file tmp-dir ".gitlibs")
|
||||||
libs-dir2 (fs/file tmp-dir ".gitlibs2")
|
libs-dir2 (fs/file tmp-dir ".gitlibs2")
|
||||||
; nested quotes need different escaping for Windows based on jvm/native test
|
; nested quotes need different escaping for Windows based on jvm/native test
|
||||||
escape-quote (if test-utils/native? "\\\\\"" "\\\"")
|
escape-quote (if test-utils/native? "\\\\\"" "\\\"")
|
||||||
deps-map (str/join escape-quote [" \"{:deps {babashka/process {:git/url "
|
deps-map (str/join escape-quote [" \"{:deps {babashka/process {:git/url "
|
||||||
"https://github.com/babashka/process" " :sha "
|
"https://github.com/babashka/process" " :sha "
|
||||||
"4c6699d06b49773d3e5c5b4c11d3334fb78cc996" "}}}\""])
|
"4c6699d06b49773d3e5c5b4c11d3334fb78cc996" "}}}\""])
|
||||||
template (str "(do (babashka.deps/clojure [\"-Sforce\" \"-Spath\" \"-Sdeps\"" deps-map "]
|
template (str "(do (babashka.deps/clojure [\"-Sforce\" \"-Spath\" \"-Sdeps\"" deps-map "]
|
||||||
{:out :string :env-key {\"PATH\" (System/getenv \"PATH\")
|
{:out :string :env-key {\"PATH\" (System/getenv \"PATH\")
|
||||||
\"GITLIBS\" :gitlibs}}) nil)")]
|
\"GITLIBS\" :gitlibs}}) nil)")]
|
||||||
(bb (-> template (str/replace ":gitlibs" (pr-str (str libs-dir)))
|
(bb (-> template (str/replace ":gitlibs" (pr-str (str libs-dir)))
|
||||||
(str/replace ":env-key" ":env")))
|
(str/replace ":env-key" ":env")))
|
||||||
(bb (-> template (str/replace ":gitlibs" (pr-str (str libs-dir2)))
|
(bb (-> template (str/replace ":gitlibs" (pr-str (str libs-dir2)))
|
||||||
(str/replace ":env-key" ":extra-env")))
|
(str/replace ":env-key" ":extra-env")))
|
||||||
(is (fs/exists? libs-dir))
|
(is (fs/exists? libs-dir))
|
||||||
(is (fs/exists? libs-dir2)))))
|
(is (fs/exists? libs-dir2)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue