-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 691 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 691 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
29
BINARY_NAME := stream-notifier
CMD_PATH := ./cmd/stream-notifier
OUT_DIR := out
.PHONY: build build-all build-linux build-windows build-darwin lint test clean
build:
go build -o $(BINARY_NAME) $(CMD_PATH)
build-all: build-linux build-windows build-darwin
build-linux:
GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/$(BINARY_NAME)-linux-x64 $(CMD_PATH)
build-windows:
GOOS=windows GOARCH=amd64 go build -o $(OUT_DIR)/$(BINARY_NAME)-windows-x64.exe $(CMD_PATH)
build-darwin:
GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/$(BINARY_NAME)-darwin-x64 $(CMD_PATH)
lint:
golangci-lint run ./...
test:
go test ./...
clean:
rm -f $(BINARY_NAME) $(BINARY_NAME).exe
rm -rf $(OUT_DIR)