Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pipeline and linter #2940

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ blocks:
- checkout
- sem-version go $(cat .go-version)
- export PATH=$(go env GOPATH)/bin:$PATH
- 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:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +82 to +84
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a note that when ServiceBot does this for us, we can remove this check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to remove it. The problem this is designed to block is someone making a manual update to the go.mod version without also changing the .go-version.

If the service bot updates both at once, there's no issue.

go install github.com/golangci/golangci-lint/cmd/[email protected] && \
golangci-lint run --timeout 10m
@echo "✅ golangci-lint"
Expand Down
9 changes: 6 additions & 3 deletions debian/patches/standard_build_layout.patch
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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/[email protected] && \
- golangci-lint run --timeout 10m
- @echo "✅ golangci-lint"
Expand Down