From 0b456bf5531e10c8939cb24a79e9bd15b4e1c943 Mon Sep 17 00:00:00 2001 From: Alexander Solovyov Date: Mon, 7 Jun 2021 17:23:17 +0300 Subject: [PATCH] 2.6 --- Makefile | 18 ++++++++---------- goreplace.go | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 869ad73..a2c9f34 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,8 @@ TAG ?= $(shell git describe --tags) GOBUILD = go build -ldflags '-w' ALL = \ - $(foreach arch,64 32,\ - $(foreach suffix,linux osx win.exe,\ - build/gr-$(arch)-$(suffix))) + $(foreach suffix,linux mac mac-arm64 win.exe,\ + build/gr-64-$(suffix)) all: $(ALL) @@ -18,16 +17,15 @@ test: # os is determined as thus: if variable of suffix exists, it's taken, if not, then # suffix itself is taken -win.exe = windows -osx = darwin +win.exe = GOOS=windows GOARCH=amd64 +linux = GOOS=linux GOARCH=amd64 +mac = GOOS=darwin GOARCH=amd64 +mac-arm64 = GOOS=darwin GOARCH=arm64 build/gr-64-%: $(SOURCE) @mkdir -p $(@D) - CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=amd64 $(GOBUILD) -o $@ - -build/gr-32-%: $(SOURCE) - @mkdir -p $(@D) - CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=386 $(GOBUILD) -o $@ + CGO_ENABLED=0 $($*) $(GOBUILD) -o $@ +# NOTE: first push a tag, then make release! release: $(ALL) ifndef desc @echo "Run it as 'make release desc=tralala'" diff --git a/goreplace.go b/goreplace.go index daeb3cc..771b3a9 100644 --- a/goreplace.go +++ b/goreplace.go @@ -19,7 +19,7 @@ import ( const ( Author = "Alexander Solovyov" - Version = "2.5" + Version = "2.6" ) var byteNewLine = []byte("\n")