Skip to content

Commit

Permalink
2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
piranha committed Jun 7, 2021
1 parent af23f60 commit 0b456bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand 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'"
Expand Down
2 changes: 1 addition & 1 deletion goreplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
Author = "Alexander Solovyov"
Version = "2.5"
Version = "2.6"
)

var byteNewLine = []byte("\n")
Expand Down

0 comments on commit 0b456bf

Please sign in to comment.