Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: '>=1.21.3'
go-version-file: go.mod
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
54 changes: 35 additions & 19 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,45 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version: "2"
run:
timeout: 10m

linters:
enable:
- lll
- misspell
- revive
- staticcheck
settings:
staticcheck:
checks:
- all
# Keep the v1 checks without enabling quick-fix suggestions.
- "-QF*"
exclusions:
generated: lax
rules:
- linters:
- lll
source: ^//\+kubebuilder
- linters:
- staticcheck
path: _test\.go
text: SA1019
- path: (.+)\.go$
text: EXC0001
- path: (.+)\.go$
text: EXC0011
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
- stylecheck
- lll

issues:
exclude-use-default: false
exclude:
# The list of ids of default excludes to include or disable.
# https://golangci-lint.run/usage/false-positives/#default-exclusions
- EXC0001
- EXC0011
exclude-rules:
- linters:
- lll
source: "^//\\+kubebuilder"
- path: "_test\\.go"
linters:
- staticcheck
text: "SA1019"
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
6 changes: 4 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version: 2

builds:
- main: cmd/main.go
env:
Expand All @@ -28,7 +30,7 @@ changelog:
exclude: []

archives:
- format: tar.gz
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
Expand All @@ -38,7 +40,7 @@ archives:
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
formats: [zip]

checksum:
name_template: 'checksums.txt'
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
test -s $(GOLANGCI_LINT) && \
$(GOLANGCI_LINT) --version | grep -o $(GOLANGCI_LINT_GO_MOD_VERSION) || \
GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint
$(GOLANGCI_LINT) --version | grep -F "version $(patsubst v%,%,$(GOLANGCI_LINT_GO_MOD_VERSION))" || \
GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint

.PHONY: ginkgo
ginkgo: ## Download ginkgo locally if necessary.
Expand Down Expand Up @@ -252,4 +252,4 @@ gen-crd-api-reference-docs: ## Download gen-crd-api-reference-docs locally if ne
goreleaser: ## Download goreleaser locally if necessary.
test -s $(GORELEASER) && \
$(GORELEASER) -v | grep $(GORELEASER_GO_MOD_VERSION) || \
GOBIN=$(LOCALBIN) go install github.com/goreleaser/goreleaser
GOBIN=$(LOCALBIN) go install github.com/goreleaser/goreleaser/v2
2 changes: 1 addition & 1 deletion config/crd/bases/styra.bankdata.dk_libraries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
controller-gen.kubebuilder.io/version: v0.22.0
name: libraries.styra.bankdata.dk
spec:
group: styra.bankdata.dk
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/styra.bankdata.dk_systems.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
controller-gen.kubebuilder.io/version: v0.22.0
name: systems.styra.bankdata.dk
spec:
group: styra.bankdata.dk
Expand Down
2 changes: 1 addition & 1 deletion docs/apis/styra/v1alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,5 @@ GitRepo
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>24c7f90</code>.
on git commit <code>6cb1f30</code>.
</em></p>
2 changes: 1 addition & 1 deletion docs/apis/styra/v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -1656,5 +1656,5 @@ System.</p>
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>24c7f90</code>.
on git commit <code>6cb1f30</code>.
</em></p>
4 changes: 4 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ publish a prerelase, simply do a prerelease tag eg. `v0.2.0-rc.1`.

This will run [goreleaser](https://goreleaser.com/) according to the
configuration in `.goreleaser.yaml`.

The release workflow reads the Go version from `go.mod`. GoReleaser v2.18.0
requires Go 1.27.0 or newer. For local releases, `make release` installs the
GoReleaser version pinned in `go.mod`.
Loading
Loading