Files
hamlab/Makefile
T

27 lines
584 B
Makefile

VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
GO ?= go
PREFIX ?= /usr/local/bin
.PHONY: all web build dev deploy clean
all: build
web:
cd web && npm ci --no-audit --no-fund && npm run build
build: web
$(GO) build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o bin/hamlab ./cmd/hamlab
# backend only (assumes web/dist already built)
go:
$(GO) build -ldflags "-X main.version=$(VERSION)" -o bin/hamlab ./cmd/hamlab
dev:
cd web && npm run dev
deploy: build
./deploy/install.sh
clean:
rm -rf bin internal/web/dist web/dist