feat: publisher에서 configuration을 씀
build / build (push) Failing after 19s

This commit is contained in:
2026-03-22 16:08:05 -06:00
parent 4c32397a48
commit b0018d07a9
4 changed files with 48 additions and 19 deletions
+10 -9
View File
@@ -14,13 +14,10 @@
::d/doerg-parser]))
(s/def ::d/directory
(s/conformer #(if-some [x (fs/file %)]
(if (fs/directory? x) x ::s/invalid)
::s/invalid)))
(s/conformer #(fs/file %)))
(s/def ::d/file
(s/conformer #(or (-> % fs/file fs/expand-home fs/absolutize)
::s/invalid)))
(s/conformer #(-> % fs/expand-home fs/file)))
(s/def ::d/executable
(s/conformer
@@ -44,12 +41,16 @@
(and (fs/exists? x) x))
(fs/split-paths (System/getenv "XDG_DATA_DIRS"))))
(defn read-config [f]
(->> f aero/read-config (s/conform ::d/config)))
(defn read-config [& files]
(->> files
(filter identity)
(map aero/read-config)
(apply merge)
(s/conform ::d/config)))
(def default
(let [r (->> "net/deertopia/doerg/config.edn"
io/resource read-config)]
(let [r (-> "net/deertopia/doerg/config.edn"
io/resource (read-config (System/getenv "DOERG_CONFIG")))]
(if (s/invalid? r)
(throw (IllegalArgumentException.
"default config is bad!"))