Make CI jobs faster (#237) · stern/stern@4bb340d · GitHub
Skip to content

Commit

Permalink
Make CI jobs faster (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
superbrothers authored Feb 26, 2023
1 parent 2315b23 commit 4bb340d
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 @@ -11,6 +11,8 @@ GOLANGCI_LINT_VERSION ?= v1.50.1
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 @@ -21,6 +23,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 --rm-dist
Expand Down Expand Up @@ -56,7 +61,11 @@ validate-krew-manifest: $(VALIDATE_KREW_MAIFEST)
$(VALIDATE_KREW_MAIFEST) -manifest dist/stern.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- --rm-dist --skip-publish --snapshot

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

.PHONY: release
Expand Down

0 comments on commit 4bb340d

Please sign in to comment.