Skip to content

Commit

Permalink
Merge pull request #1226 from smallstep/carl/install-goreleaser-pro
Browse files Browse the repository at this point in the history
Install goreleaser-pro instead of goreleaser in make bootstrap
  • Loading branch information
tashian authored Jul 22, 2024
2 parents eeb9a40 + 7f62410 commit ddc1a4f
Showing 1 changed file with 16 additions and 2 deletions.
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

0 comments on commit ddc1a4f

Please sign in to comment.