From 2b09dd0b5e585740f530a9c9cc175c3ffac800fb Mon Sep 17 00:00:00 2001 From: Julien Vincent Date: Sat, 20 Jan 2024 15:44:08 +0000 Subject: [PATCH] Include only required resources --- resources/META-INF/native-image/k16.kl/resource-config.json | 2 +- .../kl/module/network}/config/dnsmasq-external.conf | 0 .../kl/module/network}/config/dnsmasq-internal.conf | 0 .../{network-module => k16/kl/module/network}/module.edn | 0 src/k16/kl/commands/network.clj | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename resources/{network-module => k16/kl/module/network}/config/dnsmasq-external.conf (100%) rename resources/{network-module => k16/kl/module/network}/config/dnsmasq-internal.conf (100%) rename resources/{network-module => k16/kl/module/network}/module.edn (100%) diff --git a/resources/META-INF/native-image/k16.kl/resource-config.json b/resources/META-INF/native-image/k16.kl/resource-config.json index 8f7b56f..09262e4 100644 --- a/resources/META-INF/native-image/k16.kl/resource-config.json +++ b/resources/META-INF/native-image/k16.kl/resource-config.json @@ -1,7 +1,7 @@ { "resources": { "includes": [ - {"pattern": ".*"} + {"pattern": "k16/kl/module/network/.*"} ] } } diff --git a/resources/network-module/config/dnsmasq-external.conf b/resources/k16/kl/module/network/config/dnsmasq-external.conf similarity index 100% rename from resources/network-module/config/dnsmasq-external.conf rename to resources/k16/kl/module/network/config/dnsmasq-external.conf diff --git a/resources/network-module/config/dnsmasq-internal.conf b/resources/k16/kl/module/network/config/dnsmasq-internal.conf similarity index 100% rename from resources/network-module/config/dnsmasq-internal.conf rename to resources/k16/kl/module/network/config/dnsmasq-internal.conf diff --git a/resources/network-module/module.edn b/resources/k16/kl/module/network/module.edn similarity index 100% rename from resources/network-module/module.edn rename to resources/k16/kl/module/network/module.edn diff --git a/src/k16/kl/commands/network.clj b/src/k16/kl/commands/network.clj index 3248d41..e6db94a 100644 --- a/src/k16/kl/commands/network.clj +++ b/src/k16/kl/commands/network.clj @@ -17,7 +17,7 @@ (defn- write-network-module [] (let [prefix ".kl/network" - module-file (io/resource "network-module/module.edn") + module-file (io/resource "k16/kl/module/network/module.edn") module-raw (-> module-file slurp (str/replace "{{DIR}}" (.toString (api.fs/from-config-dir prefix)))) @@ -26,7 +26,7 @@ (spit (api.fs/from-config-dir prefix "module.edn") module-raw) (doseq [file (:include module)] - (let [contents (slurp (io/resource (str "network-module/" file)))] + (let [contents (slurp (io/resource (str "k16/kl/module/network/" file)))] (spit (api.fs/from-config-dir prefix file) contents))) module))