19 lines
642 B
Makefile
19 lines
642 B
Makefile
|
GIT_BRANCH=$(shell git branch | sed -n '/\* /s///p')
|
||
|
GIT_COMMIT=$(shell git log --pretty=format:'%H' -1)
|
||
|
|
||
|
all: arml arm64l amd64l
|
||
|
|
||
|
arml:
|
||
|
GOOS=linux GOARCH=arm go build -ldflags "-s -X 'main.GitBranch=$(GIT_BRANCH)' -X 'main.GitCommit=$(GIT_COMMIT)'"
|
||
|
zip -j muevent_arm_linux.zip MUEvent
|
||
|
|
||
|
arm64l:
|
||
|
GOOS=linux GOARCH=arm64 go build -ldflags "-s -X 'main.GitBranch=$(GIT_BRANCH)' -X 'main.GitCommit=$(GIT_COMMIT)'"
|
||
|
zip -j muevent_arm64_linux.zip MUEvent
|
||
|
|
||
|
amd64l:
|
||
|
GOOS=linux GOARCH=amd64 go build -ldflags "-s -X 'main.GitBranch=$(GIT_BRANCH)' -X 'main.GitCommit=$(GIT_COMMIT)'"
|
||
|
zip -j muevent_amd64_linux.zip MUEvent
|
||
|
|
||
|
clean:
|
||
|
rm -rf MUEvent
|