From 0dae3d6e886dd2007ca447c85582a7faabf72eb1 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 12:34:26 +0100 Subject: [PATCH 1/5] chore: check if go modules are tidy before build Signed-off-by: Evans Mungai --- .github/workflows/build-test.yml | 2 ++ Makefile | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 11a5c49ec..0c3ff6596 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -28,6 +28,8 @@ jobs: check-latest: true - name: Test source headers are present run: make test-source-headers + - name: Check if go mod is tidy + run: go mod tidy -diff - name: Run unit tests run: make test-coverage - name: Test build diff --git a/Makefile b/Makefile index 0785fdb2e..6624c12bb 100644 --- a/Makefile +++ b/Makefile @@ -246,3 +246,7 @@ info: @echo "Git Tag: ${GIT_TAG}" @echo "Git Commit: ${GIT_COMMIT}" @echo "Git Tree State: ${GIT_DIRTY}" + +.PHONY: tidy +tidy: + go mod tidy From 0b367e8404b5679737a7898d06b2a858e21aaf0a Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 12:47:35 +0100 Subject: [PATCH 2/5] Run go mod tidy Signed-off-by: Evans Mungai --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e2f8536a1..b0fef95bc 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/cyphar/filepath-securejoin v0.4.1 github.com/distribution/distribution/v3 v3.0.0 github.com/evanphx/json-patch/v5 v5.9.11 + github.com/fatih/color v1.13.0 github.com/fluxcd/cli-utils v0.36.0-flux.14 github.com/foxcpp/go-mockdns v1.1.0 github.com/gobwas/glob v0.2.3 @@ -70,7 +71,6 @@ require ( github.com/docker/go-metrics v0.0.1 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/fatih/color v1.13.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fxamacker/cbor/v2 v2.8.0 // indirect github.com/go-errors/errors v1.5.1 // indirect From af1c9570f518c0a2631d21e88170b41dfbafe8de Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 13:42:27 +0100 Subject: [PATCH 3/5] Rename go mod tidy check task Signed-off-by: Evans Mungai --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0c3ff6596..5456b143f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -28,7 +28,7 @@ jobs: check-latest: true - name: Test source headers are present run: make test-source-headers - - name: Check if go mod is tidy + - name: Check if go modules need to be tidied run: go mod tidy -diff - name: Run unit tests run: make test-coverage From 46c8caa4103a4cf19e80004abb552046db6e505c Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 19:11:17 +0300 Subject: [PATCH 4/5] Add info target as part of build Signed-off-by: Evans Mungai --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6624c12bb..64780b0d8 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ all: build # build .PHONY: build -build: $(BINDIR)/$(BINNAME) +build: $(BINDIR)/$(BINNAME) info $(BINDIR)/$(BINNAME): $(SRC) CGO_ENABLED=$(CGO_ENABLED) go build $(GOFLAGS) -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)'/$(BINNAME) ./cmd/helm From 064a18ff79c74f1d0ffa0a68ea501fdb97b42d11 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 17:50:26 +0100 Subject: [PATCH 5/5] Update Makefile Co-authored-by: Terry Howe Signed-off-by: Evans Mungai --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 64780b0d8..d1d6d0982 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ all: build # build .PHONY: build -build: $(BINDIR)/$(BINNAME) info +build: $(BINDIR)/$(BINNAME) tidy $(BINDIR)/$(BINNAME): $(SRC) CGO_ENABLED=$(CGO_ENABLED) go build $(GOFLAGS) -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)'/$(BINNAME) ./cmd/helm