Skip to content

Commit 34376dd

Browse files
committed
update dependencies and fix in-place sed argument for mac and linux
1 parent 60dcb10 commit 34376dd

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ TARGETDIR=$(CURRENTDIR)target
3737
# Directory where to store binary utility tools
3838
BINUTIL=$(TARGETDIR)/binutil
3939

40+
# sed argument for in-place substitutions
41+
SEDINPLACE=-i
42+
ifeq ($(shell uname -s),Darwin)
43+
SEDINPLACE=-i ''
44+
endif
45+
4046
# GO lang path
4147
ifeq ($(GOPATH),)
4248
# extract the GOPATH
@@ -61,7 +67,7 @@ GOFMT=$(shell which gofmt)
6167
GOTEST=$(GO) test
6268
GODOC=GOPATH=$(GOPATH) $(shell which godoc)
6369
GOLANGCILINT=$(BINUTIL)/golangci-lint
64-
GOLANGCILINTVERSION=v2.11.3
70+
GOLANGCILINTVERSION=v2.11.4
6571

6672
# Directory containing the source code
6773
SRCDIR=./
@@ -219,14 +225,14 @@ updateall: updatego updatelint updatemod
219225
updatego:
220226
$(eval LAST_GO_TOOLCHAIN=$(shell curl -s https://go.dev/dl/ | grep -oE 'go[0-9]+\.[0-9]+\.[0-9]+\.linux-amd64\.tar\.gz' | head -n 1 | grep -oE 'go[0-9]+\.[0-9]+\.[0-9]+'))
221227
$(eval LAST_GO_VERSION=$(shell echo ${LAST_GO_TOOLCHAIN} | grep -oE '[0-9]+\.[0-9]+'))
222-
sed --in-place=.bak "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" go.mod
223-
sed --in-place=.bak "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" go.mod
228+
sed $(SEDINPLACE) "s|^go [0-9]*\.[0-9]*$$|go ${LAST_GO_VERSION}|g" go.mod
229+
sed $(SEDINPLACE) "s|^toolchain go[0-9]*\.[0-9]*\.[0-9]*$$|toolchain ${LAST_GO_TOOLCHAIN}|g" go.mod
224230

225231
# Update linter version
226232
.PHONY: updatelint
227233
updatelint:
228234
$(eval LAST_GOLANGCILINT_VERSION=$(shell curl -sL https://github.com/golangci/golangci-lint/releases/latest | sed -n 's/.*<title>Release \(v[0-9]*\.[0-9]*\.[0-9]*\).*/\1/p'))
229-
sed --in-place=.bak "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile
235+
sed $(SEDINPLACE) "s|^GOLANGCILINTVERSION=v[0-9]*\.[0-9]*\.[0-9]*$$|GOLANGCILINTVERSION=${LAST_GOLANGCILINT_VERSION}|g" Makefile
230236

231237
# Update dependencies
232238
.PHONY: updatemod

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.67
1+
1.0.68

0 commit comments

Comments
 (0)