From 352a2fade2c190ce3bb7e4568d06d41011e687c5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 20 Nov 2024 14:03:07 +0100 Subject: [PATCH] fix: added a condition for .kbcignore file --- internal/pkg/project/ignore/file.go | 1 + internal/pkg/utils/testhelper/files.go | 2 +- .../pull-ignore-configs/in/.keboola/{kbc_ignore => .kbcignore} | 0 .../pull-ignore-configs/out/.keboola/{kbc_ignore => .kbcignore} | 0 4 files changed, 2 insertions(+), 1 deletion(-) rename test/cli/allow-target-env/pull-ignore-configs/in/.keboola/{kbc_ignore => .kbcignore} (100%) rename test/cli/allow-target-env/pull-ignore-configs/out/.keboola/{kbc_ignore => .kbcignore} (100%) diff --git a/internal/pkg/project/ignore/file.go b/internal/pkg/project/ignore/file.go index eb8c578bae..2e0d9f0448 100644 --- a/internal/pkg/project/ignore/file.go +++ b/internal/pkg/project/ignore/file.go @@ -2,6 +2,7 @@ package ignore import ( "context" + "github.com/keboola/keboola-as-code/internal/pkg/filesystem" "github.com/keboola/keboola-as-code/internal/pkg/state" "github.com/keboola/keboola-as-code/internal/pkg/utils/errors" diff --git a/internal/pkg/utils/testhelper/files.go b/internal/pkg/utils/testhelper/files.go index 5da55f0982..a11ddb8b96 100644 --- a/internal/pkg/utils/testhelper/files.go +++ b/internal/pkg/utils/testhelper/files.go @@ -15,7 +15,7 @@ func IsIgnoredFile(path string, d filesystem.FileInfo) bool { return !d.IsDir() && strings.HasPrefix(base, ".") && !strings.HasPrefix(base, ".env") && - base != ".gitignore" + base != ".gitignore" && base != ".kbcignore" } func IsIgnoredDir(path string, d filesystem.FileInfo) bool { diff --git a/test/cli/allow-target-env/pull-ignore-configs/in/.keboola/kbc_ignore b/test/cli/allow-target-env/pull-ignore-configs/in/.keboola/.kbcignore similarity index 100% rename from test/cli/allow-target-env/pull-ignore-configs/in/.keboola/kbc_ignore rename to test/cli/allow-target-env/pull-ignore-configs/in/.keboola/.kbcignore diff --git a/test/cli/allow-target-env/pull-ignore-configs/out/.keboola/kbc_ignore b/test/cli/allow-target-env/pull-ignore-configs/out/.keboola/.kbcignore similarity index 100% rename from test/cli/allow-target-env/pull-ignore-configs/out/.keboola/kbc_ignore rename to test/cli/allow-target-env/pull-ignore-configs/out/.keboola/.kbcignore