savinmax e4523df602
Some checks failed
CI / test (push) Successful in 1m10s
CI / lint (push) Successful in 30s
Release / release (push) Failing after 31s
Init
2025-08-02 18:33:50 +02:00

25 lines
523 B
Makefile

.PHONY: build test release clean
BINARY_NAME=websocket-relay
VERSION?=1.0.0
build:
mkdir -p build
go build -o build/$(BINARY_NAME) .
test:
go test -v ./...
release:
mkdir -p build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s -X main.version=$(VERSION)" -o build/$(BINARY_NAME)-linux-amd64 .
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s -X main.version=$(VERSION)" -o build/$(BINARY_NAME)-darwin-arm64 .
clean:
rm -rf build/$(BINARY_NAME)*
run:
go run .
deps:
go mod tidy