Compare commits
1 Commits
ff2a1484ae
...
f805554534
Author | SHA1 | Date |
---|---|---|
Evan Chen | f805554534 |
8
Makefile
8
Makefile
|
@ -1,6 +1,6 @@
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
VERSION=$(shell git describe --tags)
|
VERSION=$(shell git describe --tags --abbrev=0)
|
||||||
BUILD=$(shell git rev-parse --short HEAD)
|
BUILD=$(shell git rev-parse --short HEAD)
|
||||||
PROJ := $(shell basename "$(PWD)")
|
PROJ := $(shell basename "$(PWD)")
|
||||||
HUB=hub.kumoly.io
|
HUB=hub.kumoly.io
|
||||||
|
@ -31,15 +31,15 @@ build-unix:
|
||||||
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ))))
|
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ))))
|
||||||
|
|
||||||
$(foreach GOOS, $(PLATFORMS), $(foreach GOARCH, $(ARCHITECTURES), \
|
$(foreach GOOS, $(PLATFORMS), $(foreach GOARCH, $(ARCHITECTURES), \
|
||||||
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ)-basic basic/main.go)))
|
$(shell export GOOS=$(GOOS); export GOARCH=$(GOARCH); go build ${LDFLAGS} -o dist/$(PROJ)-basic_$(VERSION)_$(GOOS)_$(GOARCH)/$(PROJ)-basic basic/main.go)))
|
||||||
|
|
||||||
build-win:
|
build-win:
|
||||||
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_windows_amd64/$(PROJ).exe)
|
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_windows_amd64/$(PROJ).exe)
|
||||||
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_windows_amd64/$(PROJ)-basic.exe basic/main.go)
|
$(shell export GOOS=windows; export GOARCH=amd64; go build ${LDFLAGS} -o dist/$(PROJ)-basic_$(VERSION)_windows_amd64/$(PROJ)-basic.exe basic/main.go)
|
||||||
|
|
||||||
build-mac-m1:
|
build-mac-m1:
|
||||||
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ))
|
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ))
|
||||||
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)_$(VERSION)_darwin_arm64/$(PROJ)-basic basic/main.go)
|
$(shell export GOOS=darwin; export GOARCH=arm64; go build ${LDFLAGS} -o dist/$(PROJ)-basic_$(VERSION)_darwin_arm64/$(PROJ)-basic basic/main.go)
|
||||||
|
|
||||||
build-zip:
|
build-zip:
|
||||||
cd dist; for f in * ;do if ! [[ $$f =~ "gz" ]] ; then tar -czf $${f}.tar.gz $${f}; fi done
|
cd dist; for f in * ;do if ! [[ $$f =~ "gz" ]] ; then tar -czf $${f}.tar.gz $${f}; fi done
|
||||||
|
|
Loading…
Reference in New Issue