update tools

This commit is contained in:
bakito
2025-09-05 17:09:23 +02:00
parent 6877b58b02
commit 31ac480737
2 changed files with 63 additions and 68 deletions
+39 -51
View File
@@ -8,12 +8,13 @@ TB_LOCALBIN ?= $(TB_LOCALDIR)/bin
$(TB_LOCALBIN):
if [ ! -e $(TB_LOCALBIN) ]; then mkdir -p $(TB_LOCALBIN); fi
# Helper functions
STRIP_V = $(patsubst v%,%,$(1))
## Tool Binaries
TB_CONTROLLER_GEN ?= $(TB_LOCALBIN)/controller-gen
TB_GINKGO ?= $(TB_LOCALBIN)/ginkgo
TB_GOFUMPT ?= $(TB_LOCALBIN)/gofumpt
TB_GOLANGCI_LINT ?= $(TB_LOCALBIN)/golangci-lint
TB_GOLINES ?= $(TB_LOCALBIN)/golines
TB_GORELEASER ?= $(TB_LOCALBIN)/goreleaser
TB_MOCKGEN ?= $(TB_LOCALBIN)/mockgen
TB_OAPI_CODEGEN ?= $(TB_LOCALBIN)/oapi-codegen
@@ -22,83 +23,70 @@ TB_SEMVER ?= $(TB_LOCALBIN)/semver
## Tool Versions
# renovate: packageName=github.com/kubernetes-sigs/controller-tools
TB_CONTROLLER_GEN_VERSION ?= v0.19.0
# renovate: packageName=github.com/mvdan/gofumpt
TB_GOFUMPT_VERSION ?= v0.8.0
# renovate: packageName=github.com/golangci/golangci-lint/v2
TB_GOLANGCI_LINT_VERSION ?= v2.4.0
# renovate: packageName=github.com/segmentio/golines
TB_GOLINES_VERSION ?= v0.13.0
TB_GOLANGCI_LINT_VERSION_NUM ?= $(call STRIP_V,$(TB_GOLANGCI_LINT_VERSION))
# renovate: packageName=github.com/goreleaser/goreleaser/v2
TB_GORELEASER_VERSION ?= v2.11.2
TB_GORELEASER_VERSION ?= v2.12.0
TB_GORELEASER_VERSION_NUM ?= $(call STRIP_V,$(TB_GORELEASER_VERSION))
# renovate: packageName=github.com/uber-go/mock
TB_MOCKGEN_VERSION ?= v0.6.0
# renovate: packageName=github.com/oapi-codegen/oapi-codegen/v2
TB_OAPI_CODEGEN_VERSION ?= v2.5.0
# renovate: packageName=github.com/bakito/semver
TB_SEMVER_VERSION ?= v1.1.7
TB_SEMVER_VERSION_NUM ?= $(call STRIP_V,$(TB_SEMVER_VERSION))
## Tool Installer
.PHONY: tb.controller-gen
tb.controller-gen: $(TB_CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(TB_CONTROLLER_GEN): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/controller-gen || GOBIN=$(TB_LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(TB_CONTROLLER_GEN_VERSION)
tb.controller-gen: ## Download controller-gen locally if necessary.
@test -s $(TB_CONTROLLER_GEN) || \
GOBIN=$(TB_LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(TB_CONTROLLER_GEN_VERSION)
.PHONY: tb.ginkgo
tb.ginkgo: $(TB_GINKGO) ## Download ginkgo locally if necessary.
$(TB_GINKGO): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/ginkgo || GOBIN=$(TB_LOCALBIN) go install github.com/onsi/ginkgo/v2/ginkgo
.PHONY: tb.gofumpt
tb.gofumpt: $(TB_GOFUMPT) ## Download gofumpt locally if necessary.
$(TB_GOFUMPT): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/gofumpt || GOBIN=$(TB_LOCALBIN) go install mvdan.cc/gofumpt@$(TB_GOFUMPT_VERSION)
tb.ginkgo: ## Download ginkgo locally if necessary.
@test -s $(TB_GINKGO) || \
GOBIN=$(TB_LOCALBIN) go install github.com/onsi/ginkgo/v2/ginkgo
.PHONY: tb.golangci-lint
tb.golangci-lint: $(TB_GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
$(TB_GOLANGCI_LINT): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/golangci-lint || GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
.PHONY: tb.golines
tb.golines: $(TB_GOLINES) ## Download golines locally if necessary.
$(TB_GOLINES): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/golines || GOBIN=$(TB_LOCALBIN) go install github.com/segmentio/golines@$(TB_GOLINES_VERSION)
tb.golangci-lint: ## Download golangci-lint locally if necessary.
@test -s $(TB_GOLANGCI_LINT) && $(TB_GOLANGCI_LINT) --version | grep -q $(TB_GOLANGCI_LINT_VERSION_NUM) || \
GOBIN=$(TB_LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(TB_GOLANGCI_LINT_VERSION)
.PHONY: tb.goreleaser
tb.goreleaser: $(TB_GORELEASER) ## Download goreleaser locally if necessary.
$(TB_GORELEASER): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/goreleaser || GOBIN=$(TB_LOCALBIN) go install github.com/goreleaser/goreleaser/v2@$(TB_GORELEASER_VERSION)
tb.goreleaser: ## Download goreleaser locally if necessary.
@test -s $(TB_GORELEASER) && $(TB_GORELEASER) --version | grep -q $(TB_GORELEASER_VERSION_NUM) || \
GOBIN=$(TB_LOCALBIN) go install github.com/goreleaser/goreleaser/v2@$(TB_GORELEASER_VERSION)
.PHONY: tb.mockgen
tb.mockgen: $(TB_MOCKGEN) ## Download mockgen locally if necessary.
$(TB_MOCKGEN): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/mockgen || GOBIN=$(TB_LOCALBIN) go install go.uber.org/mock/mockgen@$(TB_MOCKGEN_VERSION)
tb.mockgen: ## Download mockgen locally if necessary.
@test -s $(TB_MOCKGEN) || \
GOBIN=$(TB_LOCALBIN) go install go.uber.org/mock/mockgen@$(TB_MOCKGEN_VERSION)
.PHONY: tb.oapi-codegen
tb.oapi-codegen: $(TB_OAPI_CODEGEN) ## Download oapi-codegen locally if necessary.
$(TB_OAPI_CODEGEN): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/oapi-codegen || GOBIN=$(TB_LOCALBIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@$(TB_OAPI_CODEGEN_VERSION)
tb.oapi-codegen: ## Download oapi-codegen locally if necessary.
@test -s $(TB_OAPI_CODEGEN) || \
GOBIN=$(TB_LOCALBIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@$(TB_OAPI_CODEGEN_VERSION)
.PHONY: tb.semver
tb.semver: $(TB_SEMVER) ## Download semver locally if necessary.
$(TB_SEMVER): $(TB_LOCALBIN)
test -s $(TB_LOCALBIN)/semver || GOBIN=$(TB_LOCALBIN) go install github.com/bakito/semver@$(TB_SEMVER_VERSION)
tb.semver: ## Download semver locally if necessary.
@test -s $(TB_SEMVER) && $(TB_SEMVER) -version | grep -q $(TB_SEMVER_VERSION_NUM) || \
GOBIN=$(TB_LOCALBIN) go install github.com/bakito/semver@$(TB_SEMVER_VERSION)
## Reset Tools
.PHONY: tb.reset
tb.reset:
@rm -f \
$(TB_LOCALBIN)/controller-gen \
$(TB_LOCALBIN)/ginkgo \
$(TB_LOCALBIN)/gofumpt \
$(TB_LOCALBIN)/golangci-lint \
$(TB_LOCALBIN)/golines \
$(TB_LOCALBIN)/goreleaser \
$(TB_LOCALBIN)/mockgen \
$(TB_LOCALBIN)/oapi-codegen \
$(TB_LOCALBIN)/semver
$(TB_CONTROLLER_GEN) \
$(TB_GINKGO) \
$(TB_GOLANGCI_LINT) \
$(TB_GORELEASER) \
$(TB_MOCKGEN) \
$(TB_OAPI_CODEGEN) \
$(TB_SEMVER)
## Update Tools
.PHONY: tb.update
tb.update: tb.reset
toolbox makefile --renovate -f $(TB_LOCALDIR)/Makefile \
sigs.k8s.io/controller-tools/cmd/controller-gen@github.com/kubernetes-sigs/controller-tools \
mvdan.cc/gofumpt@github.com/mvdan/gofumpt \
github.com/golangci/golangci-lint/v2/cmd/golangci-lint \
github.com/segmentio/golines \
github.com/goreleaser/goreleaser/v2 \
github.com/golangci/golangci-lint/v2/cmd/golangci-lint?--version \
github.com/goreleaser/goreleaser/v2?--version \
go.uber.org/mock/mockgen@github.com/uber-go/mock \
github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen \
github.com/bakito/semver
## toolbox - end
github.com/bakito/semver?-version
## toolbox - end
+24 -17
View File
@@ -1,6 +1,6 @@
// Package model provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
package model
import (
@@ -303,7 +303,7 @@ type Client struct {
// SafeSearch Safe search settings.
SafeSearch *SafeSearchConfig `json:"safe_search,omitempty"`
SafebrowsingEnabled *bool `json:"safebrowsing_enabled,omitempty"`
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
SafesearchEnabled *bool `json:"safesearch_enabled,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Upstreams *[]string `json:"upstreams,omitempty"`
@@ -369,7 +369,7 @@ type ClientFindSubEntry struct {
// SafeSearch Safe search settings.
SafeSearch *SafeSearchConfig `json:"safe_search,omitempty"`
SafebrowsingEnabled *bool `json:"safebrowsing_enabled,omitempty"`
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
SafesearchEnabled *bool `json:"safesearch_enabled,omitempty"`
Upstreams *[]string `json:"upstreams,omitempty"`
UseGlobalBlockedServices *bool `json:"use_global_blocked_services,omitempty"`
@@ -426,16 +426,23 @@ type DNSConfig struct {
BlockingMode *DNSConfigBlockingMode `json:"blocking_mode,omitempty"`
// BootstrapDns Bootstrap servers, port is optional after colon. Empty value will reset it to default values.
BootstrapDns *[]string `json:"bootstrap_dns,omitempty"`
CacheOptimistic *bool `json:"cache_optimistic,omitempty"`
CacheSize *int `json:"cache_size,omitempty"`
CacheTtlMax *int `json:"cache_ttl_max,omitempty"`
CacheTtlMin *int `json:"cache_ttl_min,omitempty"`
DisableIpv6 *bool `json:"disable_ipv6,omitempty"`
DnssecEnabled *bool `json:"dnssec_enabled,omitempty"`
EdnsCsCustomIp *string `json:"edns_cs_custom_ip,omitempty"`
EdnsCsEnabled *bool `json:"edns_cs_enabled,omitempty"`
EdnsCsUseCustom *bool `json:"edns_cs_use_custom,omitempty"`
BootstrapDns *[]string `json:"bootstrap_dns,omitempty"`
// CacheEnabled Enables or disables the DNS response cache.
//
// If `cache_enabled` is `true`, the companion field `cache_size` must
// be present and greater than 0, or the `dns.cache_size` setting in
// the configuration file must already be greater than 0.
CacheEnabled *bool `json:"cache_enabled,omitempty"`
CacheOptimistic *bool `json:"cache_optimistic,omitempty"`
CacheSize *int `json:"cache_size,omitempty"`
CacheTtlMax *int `json:"cache_ttl_max,omitempty"`
CacheTtlMin *int `json:"cache_ttl_min,omitempty"`
DisableIpv6 *bool `json:"disable_ipv6,omitempty"`
DnssecEnabled *bool `json:"dnssec_enabled,omitempty"`
EdnsCsCustomIp *string `json:"edns_cs_custom_ip,omitempty"`
EdnsCsEnabled *bool `json:"edns_cs_enabled,omitempty"`
EdnsCsUseCustom *bool `json:"edns_cs_use_custom,omitempty"`
// FallbackDns List of fallback DNS servers used when upstream DNS servers are not responding. Empty value will clear the list.
FallbackDns *[]string `json:"fallback_dns,omitempty"`
@@ -618,7 +625,7 @@ type FilterCheckHostResponse struct {
// FilterId In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to.
// Deprecated: use `rules[*].filter_list_id` instead.
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
FilterId *int `json:"filter_id,omitempty"`
// IpAddrs Set if reason=Rewrite
@@ -629,7 +636,7 @@ type FilterCheckHostResponse struct {
// Rule Filtering rule applied to the request (if any).
// Deprecated: use `rules[*].text` instead.
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Rule *string `json:"rule,omitempty"`
// Rules Applied rules.
@@ -830,7 +837,7 @@ type QueryLogItem struct {
// FilterId In case if there's a rule applied to this DNS request, this is ID of the filter list that the rule belongs to.
// Deprecated: use `rules[*].filter_list_id` instead.
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
FilterId *int `json:"filterId,omitempty"`
// OriginalAnswer Answer from upstream server (optional)
@@ -844,7 +851,7 @@ type QueryLogItem struct {
// Rule Filtering rule applied to the request (if any).
// Deprecated: use `rules[*].text` instead.
// Deprecated:
// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
Rule *string `json:"rule,omitempty"`
// Rules Applied rules.