Skip to content

Commit ddc1a4f

Browse files
authored
Merge pull request #1226 from smallstep/carl/install-goreleaser-pro
Install goreleaser-pro instead of goreleaser in make bootstrap
2 parents eeb9a40 + 7f62410 commit ddc1a4f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Makefile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,32 @@ GOOS_OVERRIDE ?=
4343
CGO_OVERRIDE ?= CGO_ENABLED=0
4444
OUTPUT_ROOT=output/
4545

46+
ifeq ($(OS),Windows_NT)
47+
HOSTOS=Windows
48+
else
49+
HOSTOS=$(shell uname)
50+
endif
51+
HOSTARCH=$(shell go env GOHOSTARCH)
52+
53+
GORELEASER_PRO_URL=https://github.com/goreleaser/goreleaser-pro/releases/latest/download/goreleaser-pro_$(HOSTOS)_$(HOSTARCH).tar.gz
54+
4655
.PHONY: all
4756

4857
#########################################
4958
# Bootstrapping
5059
#########################################
51-
60+
TMPDIR := $(shell mktemp -d)
61+
bootstra%: GOPATH=$(shell go env GOPATH)
5262
bootstra%:
5363
$Q curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin latest
5464
$Q go install golang.org/x/vuln/cmd/govulncheck@latest
5565
$Q go install gotest.tools/gotestsum@latest
5666
$Q go install golang.org/x/tools/cmd/goimports@latest
57-
$Q go install github.com/goreleaser/goreleaser@latest
67+
@echo "Installing GoReleaser Pro into $(GOPATH)/bin"
68+
$Q curl -o $(TMPDIR)/goreleaser.tar.gz -L $(GORELEASER_PRO_URL)
69+
$Q ls $(TMPDIR)
70+
$Q tar xvzf $(TMPDIR)/goreleaser.tar.gz -C $(TMPDIR)
71+
$Q cp $(TMPDIR)/goreleaser $(GOPATH)/bin
5872

5973
.PHONY: bootstra%
6074

0 commit comments

Comments
 (0)