9bb4b09a04
CI / Lint + build + test (push) Has been cancelled
Post-repair hardware validation pipeline for Proxmox cluster hosts. Go orchestrator + in-image agent + mkosi live image + bundled dnsmasq PXE + SQLite + HTMX/SSE UI + notify registry + janitor + full docs.
33 lines
934 B
Makefile
33 lines
934 B
Makefile
# live-image/Makefile — builds the Debian live image that PXE-booted
|
|
# hosts land in. Requires a Linux host (or WSL) with mkosi installed.
|
|
# On native Windows this Makefile short-circuits with a clear message.
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
UNAME_S := Windows
|
|
else
|
|
UNAME_S := $(shell uname -s)
|
|
endif
|
|
|
|
REPO_ROOT := $(abspath ..)
|
|
AGENT_BIN := $(REPO_ROOT)/bin/vetting-agent.linux-amd64
|
|
|
|
.PHONY: all check-linux agent clean
|
|
all: check-linux agent
|
|
mkosi --force build
|
|
|
|
agent: $(AGENT_BIN)
|
|
|
|
$(AGENT_BIN):
|
|
cd $(REPO_ROOT) && GOOS=linux GOARCH=amd64 go build -o $(AGENT_BIN) ./cmd/vetting-agent
|
|
|
|
check-linux:
|
|
ifneq ($(UNAME_S),Linux)
|
|
@echo "ERROR: live-image must be built on Linux (you're on $(UNAME_S))."
|
|
@echo "Run 'wsl make -C live-image all' from Windows instead."
|
|
@exit 1
|
|
endif
|
|
@command -v mkosi >/dev/null 2>&1 || { echo "ERROR: mkosi not installed. Try: apt install mkosi"; exit 1; }
|
|
|
|
clean:
|
|
rm -rf build mkosi.output mkosi.cache
|