You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wormhole-server/Makefile

41 lines
921 B

GO = go
APP_NAME = wormhole-server
VERSION = v1.0.0
LDFLAGS = -ldflags "-X main.version=$(VERSION) -X main.buildTime=$(shell date -u '+%Y-%m-%d_%H:%M:%S')"
.PHONY: all build clean deps test run
all: clean deps build
deps:
$(GO) mod download
$(GO) mod tidy
build:
$(GO) build $(LDFLAGS) -o bin/$(APP_NAME) cmd/wormhole-server/main.go
run: build
./bin/$(APP_NAME) -config configs/server.yaml
test:
$(GO) test -v ./...
clean:
rm -rf bin/
install: build
sudo cp bin/$(APP_NAME) /usr/local/bin/
docker-build:
docker build -t $(APP_NAME):$(VERSION) .
help:
@echo "Available targets:"
@echo " build - Build the server binary"
@echo " run - Build and run the server"
@echo " test - Run tests"
@echo " clean - Clean build artifacts"
@echo " deps - Download dependencies"
@echo " install - Install to /usr/local/bin"
@echo " docker-build - Build Docker image"