From b22f268d58d45a8661fabb4ca8b6501d34903ca8 Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Tue, 15 Oct 2024 11:25:25 +0530 Subject: [PATCH 1/2] Skip processing jar file in replace_placeholder.bal file --- .../scripts/replace_placeholders.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library-templates/generated-connector-template/scripts/replace_placeholders.bal b/library-templates/generated-connector-template/scripts/replace_placeholders.bal index d34a667e..7232375e 100644 --- a/library-templates/generated-connector-template/scripts/replace_placeholders.bal +++ b/library-templates/generated-connector-template/scripts/replace_placeholders.bal @@ -66,7 +66,7 @@ function processDirectory(string dir, map placeholders) returns error? { function processFile(string filePath, map placeholders) returns error? { string ext = getExtension(filePath); - if ext !is TemplateFileType || ext != "jar" { + if ext !is TemplateFileType || ext == "jar" { log:printInfo("Skipping file: " + filePath); return; } From 242d8a8fd415e3bb21a21f3a08bdf8d323037f09 Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Tue, 15 Oct 2024 11:38:31 +0530 Subject: [PATCH 2/2] Remove jar from TemplateFileType --- .../scripts/replace_placeholders.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library-templates/generated-connector-template/scripts/replace_placeholders.bal b/library-templates/generated-connector-template/scripts/replace_placeholders.bal index 7232375e..c3216d9a 100644 --- a/library-templates/generated-connector-template/scripts/replace_placeholders.bal +++ b/library-templates/generated-connector-template/scripts/replace_placeholders.bal @@ -21,7 +21,7 @@ import ballerina/log; import ballerina/time; // Define file extensions to be accepted as template files -public type TemplateFileType "bal"|"md"|"json"|"yaml"|"yml"|"toml"|"gradle"|"properties"|"gitignore"|"txt"|"jar"|"sh"|"bat"|"LICENSE"|"CODEOWNERS"; +public type TemplateFileType "bal"|"md"|"json"|"yaml"|"yml"|"toml"|"gradle"|"properties"|"gitignore"|"txt"|"sh"|"bat"|"LICENSE"|"CODEOWNERS"; # This function generates a connector template with the given metadata. # @@ -66,7 +66,7 @@ function processDirectory(string dir, map placeholders) returns error? { function processFile(string filePath, map placeholders) returns error? { string ext = getExtension(filePath); - if ext !is TemplateFileType || ext == "jar" { + if ext !is TemplateFileType { log:printInfo("Skipping file: " + filePath); return; }