forked from j3ssie/osmedeus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (26 loc) · 857 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TARGET ?= osmedeus
GO ?= go
GOFLAGS ?=
build:
go install
go build -o dist/osmedeus
release:
go install
rm -rf ./dist/* ~/myGit/premium-osmedeus-base/dist/* ~/org-osmedeus/osmedeus-base/dist/*
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -o dist/osmedeus
zip -9 -j dist/osmedeus-macos.zip dist/osmedeus
rm -rf ./dist/osmedeus
# for linux build on mac
GOOS=linux GOARCH=amd64 CC="/usr/local/bin/x86_64-linux-musl-gcc" CGO_ENABLED=1 go build -ldflags "-linkmode external -extldflags -static" -o dist/osmedeus
zip -j dist/osmedeus-linux.zip dist/osmedeus
rm -rf ./dist/osmedeus
cp dist/* ~/myGit/premium-osmedeus-base/dist/
cp dist/* ~/org-osmedeus/osmedeus-base/dist/
$(TARGET) update --gen dist/public.json
run:
$(GO) $(GOFLAGS) run *.go
fmt:
$(GO) $(GOFLAGS) fmt ./...; \
echo "Done."
test:
$(GO) $(GOFLAGS) test ./... -v%