-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (25 loc) · 928 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
31
32
33
34
35
36
37
EXECUTABLE=alfresco
WINDOWS=$(EXECUTABLE)_windows_amd64.exe
LINUX=$(EXECUTABLE)_linux_amd64
DARWIN=$(EXECUTABLE)_darwin_arm64
VERSION=$(shell git describe --tags --always --long --dirty)
.PHONY: all test clean docs
all: test build docs
build: test windows linux darwin
@echo version: $(VERSION)
windows: $(WINDOWS)
linux: $(LINUX)
darwin: $(DARWIN)
$(WINDOWS):
env GOOS=windows GOARCH=amd64 go build -v -o $(WINDOWS) -ldflags="-s -w -X main.version=$(VERSION)" ./alfresco.go
$(LINUX):
env GOOS=linux GOARCH=amd64 go build -v -o $(LINUX) -ldflags="-s -w -X main.version=$(VERSION)" ./alfresco.go
$(DARWIN):
env GOOS=darwin GOARCH=arm64 go build -v -o $(DARWIN) -ldflags="-s -w -X main.version=$(VERSION)" ./alfresco.go
test:
cd test && ./test_node.sh && ./test_people.sh && ./test_group.sh
docs:
cd docs/generate && go build generate.go && ./generate
clean:
go clean
rm -f $(WINDOWS) $(LINUX) $(DARWIN)