Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install goreleaser-pro instead of goreleaser in make bootstrap #1226

Merged
merged 2 commits into from
Jul 22, 2024
Merged
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
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,32 @@ GOOS_OVERRIDE ?=
CGO_OVERRIDE ?= CGO_ENABLED=0
OUTPUT_ROOT=output/

ifeq ($(OS),Windows_NT)
HOSTOS=Windows
else
HOSTOS=$(shell uname)
endif
HOSTARCH=$(shell go env GOHOSTARCH)

GORELEASER_PRO_URL=https://github.com/goreleaser/goreleaser-pro/releases/latest/download/goreleaser-pro_$(HOSTOS)_$(HOSTARCH).tar.gz

.PHONY: all

#########################################
# Bootstrapping
#########################################

TMPDIR := $(shell mktemp -d)
bootstra%: GOPATH=$(shell go env GOPATH)
bootstra%:
$Q curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin latest
$Q go install golang.org/x/vuln/cmd/govulncheck@latest
$Q go install gotest.tools/gotestsum@latest
$Q go install golang.org/x/tools/cmd/goimports@latest
$Q go install github.com/goreleaser/goreleaser@latest
@echo "Installing GoReleaser Pro into $(GOPATH)/bin"
$Q curl -o $(TMPDIR)/goreleaser.tar.gz -L $(GORELEASER_PRO_URL)
$Q ls $(TMPDIR)
$Q tar xvzf $(TMPDIR)/goreleaser.tar.gz -C $(TMPDIR)
$Q cp $(TMPDIR)/goreleaser $(GOPATH)/bin

.PHONY: bootstra%

Expand Down