Skip to content

Instantly share code, notes, and snippets.

@MrGung
Created August 11, 2012 10:16
Show Gist options
  • Save MrGung/3323473 to your computer and use it in GitHub Desktop.
Save MrGung/3323473 to your computer and use it in GitHub Desktop.
Configuration with functions (and without macro)
(configure-for-ns 'gf.job.project.datenbank.simple-patch-db
(extends ['config.db-server
'gf.job.datenbank.db-patch]
(let [
;; in dieses Verzeichnis werden die Trafo-Skripte generiert und von hier werden sie in das Project-Entwicklungsverzeichnis kopiert
trafo-gen-dir "c:\\Users\\me\\Documents\\Scratch\\Database\\Trafos\\1.0A_patches\\"
;; Hier landen die EXE-Patches.
patches-dst-dir "q:\\Current\\Job.Project\\Current\\Datenbank\\Dev-Patches\\"
db-patches-raw (:db-patches (from-ns-config 'gf.job.project.datenbank.db-patches))
db-patches (->> db-patches-raw
(map (fn [patch] (update-in patch [:script-src] (fn [_] (str trafo-gen-dir (:script patch)))))) ;; wird hinzugefügt.
(map (fn [patch] (update-in patch [:script] (fn [script] (str patches-dst-dir script))))))]
{
:db-patches db-patches})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment