feat: publisher에서 configuration을 씀
Some checks failed
build / build (push) Failing after 20s

This commit is contained in:
2026-03-22 16:08:05 -06:00
parent 4c32397a48
commit 77f2285728
4 changed files with 41 additions and 15 deletions

View File

@@ -19,7 +19,7 @@
::s/invalid)))
(s/def ::d/file
(s/conformer #(or (-> % fs/file fs/expand-home fs/absolutize)
(s/conformer #(or (-> % fs/expand-home fs/file)
::s/invalid)))
(s/def ::d/executable
@@ -44,12 +44,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!"))