From e103fe996c5053e305a2707fc310e5c8a64d97c6 Mon Sep 17 00:00:00 2001 From: tkrop Date: Thu, 18 Jan 2024 20:07:02 +0100 Subject: [PATCH] chore: update deps (#71) Signed-off-by: tkrop --- Makefile | 20 ++++++++++++++++---- Makefile.defs | 24 ------------------------ go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 Makefile.defs diff --git a/Makefile b/Makefile index 965053a..f838836 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,23 @@ else $(warning warning: please customize variables in Makefile.vars) endif -GOBIN ?= $(shell go env GOPATH)/bin -GOMAKE ?= github.com/tkrop/go-make@v0.0.35 -TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ - go install $(GOMAKE) >/dev/stderr && $(GOBIN)/go-make targets) +# Setup desired go compiler environemt or defaults. +export GO ?= go +ifndef GOSETUP + export GOBIN ?= $(shell $(GO) env GOPATH)/bin +else ifeq ($(GOSETUP),local) + export GOBIN := $(DIR_BUILD)/bin + export PATH := $(GOBIN):$(PATH) +else + $(error error: unsupported go setup ($(GOSETUP))) +endif +# Setup go-make to utilize desired build and config scripts. +GOMAKE_DEP ?= github.com/tkrop/go-make@v0.0.41 +# Request targets from go-make targets target. +TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ + go install $(GOMAKE_DEP) >/dev/stderr && \ + $(GOBIN)/go-make targets 2>/dev/null) # Declare all targets phony to make them available for auto-completion. .PHONY:: $(TARGETS) diff --git a/Makefile.defs b/Makefile.defs deleted file mode 100644 index 8ac3ad0..0000000 --- a/Makefile.defs +++ /dev/null @@ -1,24 +0,0 @@ -# Setup environment for all run-targets (to be modified) -define run-setup - true -endef - -# Define variables for all run-targets (to be modified) -define run-vars - -endef - -# Define variables for local run-targets (to be modified) -define run-vars-local - -endef - -# Define variables for image run-targets (to be modified) -define run-vars-image - -endef - -# Define aws localstack setup (to be modified). -define run-aws-setup - true -endef diff --git a/go.mod b/go.mod index 4755339..463fcfd 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/h2non/gock v1.2.0 github.com/huandu/go-clone v1.6.0 github.com/stretchr/testify v1.8.4 - golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a golang.org/x/text v0.13.0 golang.org/x/tools v0.17.0 ) diff --git a/go.sum b/go.sum index f45487a..8ef38ef 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= -golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=