-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 993 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 993 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
30
31
32
33
BINARY_NAME=maestro-complete-reports
CMD_PATH=./cmd/maestro-complete-reports
BIN_DIR=bin
.PHONY: all clean build build-all darwin linux windows checksums
all: build-all
build:
go build -o $(BIN_DIR)/$(BINARY_NAME) $(CMD_PATH)
build-all: darwin linux windows checksums
darwin:
GOOS=darwin GOARCH=amd64 go build -o $(BIN_DIR)/$(BINARY_NAME)-darwin-amd64 $(CMD_PATH)
GOOS=darwin GOARCH=arm64 go build -o $(BIN_DIR)/$(BINARY_NAME)-darwin-arm64 $(CMD_PATH)
linux:
GOOS=linux GOARCH=amd64 go build -o $(BIN_DIR)/$(BINARY_NAME)-linux-amd64 $(CMD_PATH)
GOOS=linux GOARCH=arm64 go build -o $(BIN_DIR)/$(BINARY_NAME)-linux-arm64 $(CMD_PATH)
windows:
GOOS=windows GOARCH=amd64 go build -o $(BIN_DIR)/$(BINARY_NAME)-windows-amd64.exe $(CMD_PATH)
GOOS=windows GOARCH=arm64 go build -o $(BIN_DIR)/$(BINARY_NAME)-windows-arm64.exe $(CMD_PATH)
checksums:
@cd $(BIN_DIR) && for f in $(BINARY_NAME)-*; do shasum -a 256 "$$f" > "$$f.sha256"; done
clean:
rm -rf $(BIN_DIR)
test:
go test ./...