Skip to content

Commit

Permalink
Make CI jobs faster (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
superbrothers authored Apr 16, 2023
1 parent c8b3a99 commit d553783
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ GOLANGCI_LINT_VERSION ?= v1.52.2
GOLANGCI_LINT := $(TOOLS_BIN_DIR)/golangci-lint
VALIDATE_KREW_MAIFEST_VERSION ?= v0.4.3
VALIDATE_KREW_MAIFEST := $(TOOLS_BIN_DIR)/validate-krew-manifest
GORELEASER_FILTER_VERSION ?= v0.3.0
GORELEASER_FILTER := $(TOOLS_BIN_DIR)/goreleaser-filter

$(GORELEASER):
GOBIN=$(TOOLS_BIN_DIR) go install github.com/goreleaser/goreleaser@$(GORELEASER_VERSION)
Expand All @@ -22,6 +24,9 @@ $(GOLANGCI_LINT):
$(VALIDATE_KREW_MAIFEST):
GOBIN=$(TOOLS_BIN_DIR) go install sigs.k8s.io/krew/cmd/validate-krew-manifest@$(VALIDATE_KREW_MAIFEST_VERSION)

$(GORELEASER_FILTER):
GOBIN=$(TOOLS_BIN_DIR) go install github.com/t0yv0/goreleaser-filter@$(GORELEASER_FILTER_VERSION)

.PHONY: build-cross
build-cross: $(GORELEASER)
$(GORELEASER) build --snapshot --clean
Expand All @@ -47,7 +52,11 @@ validate-krew-manifest: $(VALIDATE_KREW_MAIFEST)
$(VALIDATE_KREW_MAIFEST) -manifest dist/view-serviceaccount-kubeconfig.yaml -skip-install

.PHONY: dist
dist: $(GORELEASER)
dist: $(GORELEASER) $(GORELEASER_FILTER)
cat .goreleaser.yaml | $(GORELEASER_FILTER) -goos $(shell go env GOOS) -goarch $(shell go env GOARCH) | $(GORELEASER) release -f- --clean --skip-publish --snapshot

.PHONY: dist-all
dist-all: $(GORELEASER)
$(GORELEASER) release --clean --skip-publish --snapshot

.PHONY: release
Expand Down

0 comments on commit d553783

Please sign in to comment.