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
6 changes: 5 additions & 1 deletion make/go/dep_bufstyle.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)
$(call _assert_var,BUF_VERSION)

# We want to ensure we rebuild bufstyle every time we require a new Go minor version.
# Otherwise, the cached version may not support the latest language features.
BUFSTYLE_GO_VERSION := $(shell go list -m -f '{{.GoVersion}}' | cut -d'.' -f1-2)

# Settable
# https://github.com/bufbuild/bufstyle-go/releases
BUFSTYLE_VERSION ?= v0.5.0

BUFSTYLE := $(CACHE_VERSIONS)/bufstyle/$(BUFSTYLE_VERSION)
BUFSTYLE := $(CACHE_VERSIONS)/bufstyle/$(BUFSTYLE_VERSION)-go$(BUFSTYLE_GO_VERSION)
$(BUFSTYLE):
@rm -f $(CACHE_BIN)/bufstyle
GOBIN=$(CACHE_BIN) go install buf.build/go/bufstyle@$(BUFSTYLE_VERSION)
Expand Down
6 changes: 5 additions & 1 deletion make/go/dep_godoclint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ $(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)
$(call _assert_var,BUF_VERSION)

# We want to ensure we rebuild godoclint every time we require a new Go minor version.
# Otherwise, the cached version may not support the latest language features.
GODOCLINT_GO_VERSION := $(shell go list -m -f '{{.GoVersion}}' | cut -d'.' -f1-2)

# Settable
#
# Based off of dev branch.
# https://github.com/bufbuild/godoc-lint/commits/dev
GODOCLINT_VERSION ?= 26c7b506fc2bf37a67fc2b42a3d9825c7ade2068

GODOCLINT := $(CACHE_VERSIONS)/godoclint/$(GODOCLINT_VERSION)
GODOCLINT := $(CACHE_VERSIONS)/godoclint/$(GODOCLINT_VERSION)-go$(GODOCLINT_GO_VERSION)
$(GODOCLINT):
@rm -f $(CACHE_BIN)/godoclint
$(eval GODOCLINT_TMP := $(shell mktemp -d))
Expand Down