From 4c7549c10c9edfd2aa0ac13f3bd052fd00f2a34a Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 7 Jun 2023 11:38:47 +0200 Subject: [PATCH] Make replacing simpler --- src/main/cljc/dda/c4k_forgejo/forgejo.cljc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc index d64e589..0150326 100644 --- a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc +++ b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc @@ -91,9 +91,10 @@ (cm/replace-all-matching-values-by-new-value "MAILERPORT" mailer-port) (cm/replace-all-matching-values-by-new-value "WHITELISTDOMAINS" service-domain-whitelist) (cm/replace-all-matching-values-by-new-value "NOREPLY" service-noreply-address) - #(if deploy-federated-bool - (cm/replace-all-matching-values-by-new-value % "IS_FEDERATED" "true") - (cm/replace-all-matching-values-by-new-value % "IS_FEDERATED" "false"))))) + (cm/replace-all-matching-values-by-new-value "IS_FEDERATED" + (if deploy-federated-bool + "true" + "false"))))) (defn generate-secrets [auth] @@ -132,9 +133,10 @@ deploy-federated-bool (boolean (Boolean/valueOf deploy-federated))] (-> (yaml/load-as-edn "forgejo/deployment.yaml") - #(if deploy-federated-bool - (cm/replace-all-matching-values-by-new-value % "IMAGE_NAME" federated-image-name) - (cm/replace-all-matching-values-by-new-value % "IMAGE_NAME" non-federated-image-name))))) + (cm/replace-all-matching-values-by-new-value "IMAGE_NAME" + (if deploy-federated-bool + federated-image-name + non-federated-image-name))))) (defn generate-service []