process-compose/Makefile

36 lines
780 B
Makefile
Raw Normal View History

2022-04-06 00:26:50 +03:00
BINARY_NAME=process-compose
2022-04-16 01:44:27 +03:00
EXT=''
RM=rm
ifeq ($(OS),Windows_NT)
EXT=.exe
RM = cmd /C del /Q /F
endif
2022-04-06 00:26:50 +03:00
.PHONY: test run
buildrun: build run
build:
2022-04-16 01:44:27 +03:00
go build -o bin/${BINARY_NAME}${EXT} ./src
2022-04-06 00:26:50 +03:00
compile:
2022-04-16 12:55:05 +03:00
# Linux
2022-04-06 00:26:50 +03:00
GOOS=linux GOARCH=386 go build -o bin/${BINARY_NAME}-linux-386 ./src
GOOS=linux GOARCH=amd64 go build -o bin/${BINARY_NAME}-linux-amd64 ./src
GOOS=linux GOARCH=arm64 go build -o bin/${BINARY_NAME}-linux-arm64 ./src
GOOS=linux GOARCH=arm go build -o bin/${BINARY_NAME}-linux-arm ./src
2022-04-16 01:44:27 +03:00
2022-04-16 12:55:05 +03:00
# Windows
GOOS=windows GOARCH=amd64 go build -o bin/${BINARY_NAME}-windows-amd64.exe ./src
2022-04-06 00:26:50 +03:00
test:
go test -cover ./src
coverhtml:
go test -coverprofile=coverage.out ./src
go tool cover -html=coverage.out
run:
2022-04-16 01:44:27 +03:00
./bin/${BINARY_NAME}${EXT}
2022-04-06 00:26:50 +03:00
clean:
2022-04-16 12:55:05 +03:00
$(RM) bin/${BINARY_NAME}*