-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 746 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 746 Bytes
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
GOOS?=linux
GOARCH?=amd64
MIFY_VERSION=$(shell git describe --tags --always)
SUPPORTED_OS_LIST=linux darwin
SUPPORTED_ARCH_LIST=amd64 arm64
all: build lint
build:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -v -ldflags "-X github.com/mify-io/mify/cmd/mify/cmd.MIFY_VERSION=$(MIFY_VERSION)" ./cmd/mify
build-packages:
for os in $(SUPPORTED_OS_LIST); do \
for arch in $(SUPPORTED_ARCH_LIST); do \
echo "making package for os: $$os, arch: $$arch"; \
GOOS=$$os GOARCH=$$arch go build -v -ldflags "-X github.com/mify-io/mify/cmd/mify/cmd.MIFY_VERSION=$(MIFY_VERSION)" ./cmd/mify; \
./scripts/makepkg.sh $$os $$arch; \
echo "done os: $$os, arch: $$arch"; \
done \
done
test:
go test -v ./...
lint:
go vet ./...
staticcheck ./...