From cc586fc7f1bad7a984dba119547adc98ab41e27e Mon Sep 17 00:00:00 2001 From: Jacopo Andrea Giola Date: Thu, 12 Sep 2024 17:16:04 +0200 Subject: [PATCH] feat: update tools --- .devcontainer/devcontainer.json | 4 ++-- .github/workflows/ci.yaml | 2 +- .github/workflows/codeql.yaml | 2 +- .go-version | 2 +- .goreleaser.yaml | 2 +- go.mod | 2 +- internal/git/filesgetter_test.go | 4 ++++ internal/git/test_helper.go | 6 ++++++ pkg/cmd/sync/sync_test.go | 1 + tools/DEEPCOPY_GEN_VERSION | 2 +- tools/GOLANGCI_LINT_VERSION | 2 +- tools/GORELEASER_VERSION | 2 +- 12 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c57ae9c..bd794d2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,9 @@ { "name": "Go", - "image": "golang:1.22.5", + "image": "golang:1.23.1", "features": { "ghcr.io/devcontainers/features/common-utils:2": {"username": "golang"}, - "ghcr.io/devcontainers/features/go:1": {"version": "none", "golangciLintVersion": "1.59.1"} + "ghcr.io/devcontainers/features/go:1": {"version": "none", "golangciLintVersion": "1.61.0"} }, "runArgs": [ "--cap-add=SYS_PTRACE", diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f6f297f..18d56f6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ on: - examples/** env: - GORELEASER_VERSION: v2.1.0 + GORELEASER_VERSION: v2.2.0 jobs: lint: name: Lint Code diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index bf2191b..083e8d7 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -16,7 +16,7 @@ on: - cron: 0 5 * * 1 # Run every monday at 5 UTC env: - GORELEASER_VERSION: v2.1.0 + GORELEASER_VERSION: v2.2.0 jobs: codeql: diff --git a/.go-version b/.go-version index da9594f..49e0a31 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.22.5 +1.23.1 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ee08992..3a25864 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -43,7 +43,7 @@ checksum: name_template: checksums.txt snapshot: - name_template: "{{ .ShortCommit }}" + version_template: "{{ .ShortCommit }}" changelog: sort: asc diff --git a/go.mod b/go.mod index 27b9694..f9ccbd3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/mia-platform/vab -go 1.22.5 +go 1.23.1 require ( github.com/MakeNowJust/heredoc/v2 v2.0.1 diff --git a/internal/git/filesgetter_test.go b/internal/git/filesgetter_test.go index b1efa94..7ca5ff1 100644 --- a/internal/git/filesgetter_test.go +++ b/internal/git/filesgetter_test.go @@ -70,6 +70,10 @@ func TestGetFiles(t *testing.T) { "filter module files": { pkgDefinition: v1alpha1.NewModule(t, "category/test-module1/test-flavor1", "1.0.0", false), expectedFiles: []*File{ + { + path: "test-flavor1/file.json", + internalPath: "modules/category/test-module1/test-flavor1/file.json", + }, { path: "test-flavor1/file1.yaml", internalPath: "modules/category/test-module1/test-flavor1/file1.yaml", diff --git a/internal/git/test_helper.go b/internal/git/test_helper.go index 2e343ba..0c214aa 100644 --- a/internal/git/test_helper.go +++ b/internal/git/test_helper.go @@ -65,6 +65,12 @@ func populateWorktree(t *testing.T, fsys billy.Filesystem) { assert.NoError(t, err) err = f.Close() assert.NoError(t, err) + f, err = fsys.Create("modules/category/test-module1/test-flavor1/file.json") + assert.NoError(t, err) + _, err = f.Write([]byte(`{"key":"file json content"}`)) + assert.NoError(t, err) + err = f.Close() + assert.NoError(t, err) f, err = fsys.Create("modules/category/test-module1/test-flavor2/file1.yaml") assert.NoError(t, err) _, err = f.Write([]byte("file1-2-1 content\n")) diff --git a/pkg/cmd/sync/sync_test.go b/pkg/cmd/sync/sync_test.go index 92082d3..1ea5a68 100644 --- a/pkg/cmd/sync/sync_test.go +++ b/pkg/cmd/sync/sync_test.go @@ -175,6 +175,7 @@ var ( "vendors/modules/category/test-module1-v1.0.0/test-flavor1", "vendors/modules/category/test-module1-v1.0.0/test-flavor1/file1.yaml", "vendors/modules/category/test-module1-v1.0.0/test-flavor1/file2.yaml", + "vendors/modules/category/test-module1-v1.0.0/test-flavor1/file.json", "vendors/modules/category/test-module1-v1.0.0/test-flavor2", "vendors/modules/category/test-module1-v1.0.0/test-flavor2/file1.yaml", } diff --git a/tools/DEEPCOPY_GEN_VERSION b/tools/DEEPCOPY_GEN_VERSION index 43bd443..5affb13 100644 --- a/tools/DEEPCOPY_GEN_VERSION +++ b/tools/DEEPCOPY_GEN_VERSION @@ -1 +1 @@ -v0.30.3 +v0.31.1 diff --git a/tools/GOLANGCI_LINT_VERSION b/tools/GOLANGCI_LINT_VERSION index be33d89..137ade0 100644 --- a/tools/GOLANGCI_LINT_VERSION +++ b/tools/GOLANGCI_LINT_VERSION @@ -1 +1 @@ -v1.59.1 +v1.61.0 diff --git a/tools/GORELEASER_VERSION b/tools/GORELEASER_VERSION index 1defe53..a4b6ac3 100644 --- a/tools/GORELEASER_VERSION +++ b/tools/GORELEASER_VERSION @@ -1 +1 @@ -v2.1.0 +v2.2.0