-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
34 lines (32 loc) · 897 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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_DIR=output
PACKAGE_NAME=merry
BINARY_LINUX=$(BINARY_DIR)/$(PACKAGE_NAME)_linux
BINARY_MACOS=$(BINARY_DIR)/$(PACKAGE_NAME)_macos
BINARY_WINDOWS=$(BINARY_DIR)/$(PACKAGE_NAME)_windows.exe
BINARY_WASM=$(BINARY_DIR)/$(PACKAGE_NAME).wasm
all: clean build
build: build-linux build-windows build-macos
test:
$(GOTEST) -v ./...
clean:
$(GOCLEAN)
rm -rf $(BINARY_DIR)
run:
$(GOBUILD) -o $(BINARY_DIR) -v ./...
./$(BINARY_DIR)
lint:
golint ./pkg/...
changelog:
conventional-changelog -p angular -i CHANGELOG.md -s -r 0
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_LINUX) -v
build-windows:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_WINDOWS) -v
build-macos:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_MACOS) -v