Replace the shell-only user workflow with `banger` and `bangerd`: Cobra commands, XDG/SQLite-backed state, managed VM and image lifecycle, and a Bubble Tea TUI for browsing and operating VMs.\n\nKeep Firecracker orchestration behind the daemon so VM specs become persistent objects, and add repo entrypoints for building, installing, and documenting the new flow while still delegating rootfs customization to the existing shell tooling.\n\nHarden the control plane around real usage by reclaiming Firecracker API sockets for the user, restarting stale daemons after rebuilds, and returning the correct `vm.create` payload so the CLI and TUI creation flow work reliably.\n\nValidation: `go test ./...`, `make build`, and a host-side smoke test with `./banger vm create --name codex-smoke`.
53 lines
1.2 KiB
Makefile
53 lines
1.2 KiB
Makefile
SHELL := /usr/bin/env bash
|
|
|
|
GO ?= go
|
|
GOFMT ?= gofmt
|
|
INSTALL ?= install
|
|
PREFIX ?= $(HOME)/.local
|
|
BINDIR ?= $(PREFIX)/bin
|
|
DESTDIR ?=
|
|
BINARIES := banger bangerd
|
|
GO_SOURCES := $(shell find cmd internal -type f -name '*.go' | sort)
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
.PHONY: help build banger bangerd test fmt tidy clean rootfs install
|
|
|
|
help:
|
|
@printf '%s\n' \
|
|
'Targets:' \
|
|
' make build Build ./banger and ./bangerd' \
|
|
' make install Build and install binaries into $(DESTDIR)$(BINDIR)' \
|
|
' make test Run go test ./...' \
|
|
' make fmt Format Go sources under cmd/ and internal/' \
|
|
' make tidy Run go mod tidy' \
|
|
' make clean Remove built Go binaries' \
|
|
' make rootfs Run ./make-rootfs.sh'
|
|
|
|
build: $(BINARIES)
|
|
|
|
banger: $(GO_SOURCES) go.mod go.sum
|
|
$(GO) build -o ./banger ./cmd/banger
|
|
|
|
bangerd: $(GO_SOURCES) go.mod go.sum
|
|
$(GO) build -o ./bangerd ./cmd/bangerd
|
|
|
|
test:
|
|
$(GO) test ./...
|
|
|
|
fmt:
|
|
$(GOFMT) -w $(GO_SOURCES)
|
|
|
|
tidy:
|
|
$(GO) mod tidy
|
|
|
|
clean:
|
|
rm -f ./banger ./bangerd
|
|
|
|
install: build
|
|
mkdir -p "$(DESTDIR)$(BINDIR)"
|
|
$(INSTALL) -m 0755 ./banger "$(DESTDIR)$(BINDIR)/banger"
|
|
$(INSTALL) -m 0755 ./bangerd "$(DESTDIR)$(BINDIR)/bangerd"
|
|
|
|
rootfs:
|
|
./make-rootfs.sh
|