From 4ab1d064ceb4509d490d8f1ef6e9694004815899 Mon Sep 17 00:00:00 2001 From: Steven Gagniere Date: Thu, 14 Nov 2024 12:43:34 -0800 Subject: [PATCH 1/3] Check that golang-fips has a release that matches the current go-version --- .semaphore/semaphore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 18d75deeef..6e0c890872 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -44,6 +44,7 @@ blocks: - checkout - sem-version go $(cat .go-version) - export PATH=$(go env GOPATH)/bin:$PATH + - git clone --branch go$(cat cli/.go-version)-1-openssl-fips --depth 1 https://github.com/golang-fips/go.git go-openssl # validate that a release for the current .go-version exists - make test epilogue: always: From 6088b9efccfffd1b354d905fd4a53ec4c0ba928c Mon Sep 17 00:00:00 2001 From: Steven Gagniere Date: Thu, 14 Nov 2024 13:19:15 -0800 Subject: [PATCH 2/3] Lint on go.mod version matching .go-version --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 1a1412149e..bf80383042 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,9 @@ lint: lint-go lint-cli .PHONY: lint-go lint-go: +ifneq ($(shell cat .go-version),$(shell go list -m -f '{{.GoVersion}}')) + $(error The go versions in go.mod and .go-version must match) +endif go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 && \ golangci-lint run --timeout 10m @echo "✅ golangci-lint" From 7311ea6ef46a4d65db9bc601300d0332d1cfb687 Mon Sep 17 00:00:00 2001 From: Steven Gagniere Date: Thu, 14 Nov 2024 13:46:04 -0800 Subject: [PATCH 3/3] fix mistakes --- .semaphore/semaphore.yml | 2 +- debian/patches/standard_build_layout.patch | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 6e0c890872..29af81ba0e 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -44,7 +44,7 @@ blocks: - checkout - sem-version go $(cat .go-version) - export PATH=$(go env GOPATH)/bin:$PATH - - git clone --branch go$(cat cli/.go-version)-1-openssl-fips --depth 1 https://github.com/golang-fips/go.git go-openssl # validate that a release for the current .go-version exists + - git clone --branch go$(cat .go-version)-1-openssl-fips --depth 1 https://github.com/golang-fips/go.git go-openssl # validate that a release for the current .go-version exists - make test epilogue: always: diff --git a/debian/patches/standard_build_layout.patch b/debian/patches/standard_build_layout.patch index 9cef24d91f..40ed116651 100644 --- a/debian/patches/standard_build_layout.patch +++ b/debian/patches/standard_build_layout.patch @@ -1,6 +1,6 @@ ---- cli/Makefile 2024-09-26 10:12:52.818827565 -0700 -+++ debian/Makefile 2024-09-11 13:09:21.649421504 -0700 -@@ -1,139 +1,163 @@ +--- cli/Makefile 2024-11-14 13:18:17.935544771 -0800 ++++ debian/Makefile 2024-10-14 14:34:25.138231210 -0700 +@@ -1,142 +1,163 @@ -SHELL := /bin/bash -GORELEASER_VERSION := v1.21.2 +SHELL=/bin/bash @@ -165,6 +165,9 @@ - -.PHONY: lint-go -lint-go: +-ifneq ($(shell cat .go-version),$(shell go list -m -f '{{.GoVersion}}')) +- $(error The go versions in go.mod and .go-version must match) +-endif - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 && \ - golangci-lint run --timeout 10m - @echo "✅ golangci-lint"