Skip to content

Commit

Permalink
Auto install goreleaser when binary is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofranssen committed Sep 11, 2023
1 parent 872d494 commit 0750306
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ image: ## build the binary in a docker image
.

.PHONY: snapshot-release
snapshot-release: ## creates a snapshot release using goreleaser
LDFLAGS=$(LDFLAGS) GIT_TAG=$(GIT_TAG) GIT_HASH=$(GIT_HASH) goreleaser release --snapshot --rm-dist
snapshot-release: $(GO_PATH)/bin/goreleaser ## creates a snapshot release using goreleaser
LDFLAGS=$(LDFLAGS) GIT_TAG=$(GIT_TAG) GIT_HASH=$(GIT_HASH) goreleaser release --snapshot --clean

.PHONY: release
release: ## creates a release using goreleaser
release: $(GO_PATH)/bin/goreleaser ## creates a release using goreleaser
LDFLAGS=$(LDFLAGS) GIT_TAG=$(GIT_TAG) GIT_HASH=$(GIT_HASH) goreleaser release

release-vars: ## print the release variables for goreleaser
Expand All @@ -67,6 +67,9 @@ $(GO_PATH)/bin/goimports:
$(GO_PATH)/bin/golint:
go install golang.org/x/lint/golint@latest

$(GO_PATH)/bin/goreleaser:
go install github.com/goreleaser/goreleaser@latest

.PHONY: lint
lint: $(GO_PATH)/bin/goimports $(GO_PATH)/bin/golint ## runs linting
@echo Linting using golint
Expand Down

0 comments on commit 0750306

Please sign in to comment.