26 lines
1.1 KiB
Makefile
26 lines
1.1 KiB
Makefile
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
|
|
# All tools are designed to be build inside $GOBIN.
|
|
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
GOPATH ?= $(shell go env GOPATH)
|
|
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
|
|
GO ?= $(shell which go)
|
|
|
|
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
|
|
# will be used; reinstalling only if needed.
|
|
# For example for goimports variable:
|
|
#
|
|
# In your main Makefile (for non array binaries):
|
|
#
|
|
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
|
|
#
|
|
#command: $(GOIMPORTS)
|
|
# @echo "Running goimports"
|
|
# @$(GOIMPORTS) <flags/args..>
|
|
#
|
|
GOIMPORTS := $(GOBIN)/goimports-v0.9.3
|
|
$(GOIMPORTS): $(BINGO_DIR)/goimports.mod
|
|
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
|
@echo "(re)installing $(GOBIN)/goimports-v0.9.3"
|
|
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goimports.mod -o=$(GOBIN)/goimports-v0.9.3 "golang.org/x/tools/cmd/goimports"
|
|
|