quintodrome.quineglobal.com/Makefile
Philip Peterson 450d38c6da Extract shared site framework into internal/site and internal/component
Reduces sites/quintodrome and sites/hyper to their genuinely site-specific
parts: a Config (branding, GitHub repo, Linux download-format list),
classifyAsset, and landing-page content/mockup. Everything else — the HTTP
server, routes, release cache, update-check protocol, and page chrome —
now lives once in internal/site and internal/component.

The Linux format toggle's button list, order, and per-format arch
availability is now driven entirely by Config.LinuxFormats, reproducing
each site's current behavior as data (quintodrome shows Snap on both
arches; hyper hides it on arm64) rather than as forked logic. The one
deliberate behavior change: platformLabel's "linux-*" normalization
(previously only applied to linux-rpm on hyper's side) now applies to all
linux-* formats, fixing a cosmetic label bug on hyper's deb/pacman/flatpak
download rows ("linux-deb · x64.deb" -> "Linux · x64.deb").

Also unifies top-level tooling: a single SITE-parameterized Makefile and
Dockerfile, a single tailwind.config.js scanning internal/** and sites/**,
and a shared public/ with both product logos.

Verified: go build/vet/test pass for both sites, and `make dev
SITE=quintodrome` / `SITE=hyper` were run and curl-checked against /,
/download (including each site's Linux format toggle and arch-filtering),
and /api/update-check, matching pre-refactor behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 03:55:36 -08:00

46 lines
826 B
Makefile

# SITE selects which site under sites/ to build/run: quintodrome or hyper.
SITE ?= quintodrome
.PHONY: benchmark
benchmark:
go test -bench=.
.PHONY: build
build:
docker build --platform linux/amd64 --build-arg SITE=$(SITE) . -t forge.quinefoundation.com/ironmagma/$(SITE)-quineglobal-com
.PHONY: push
push: build
docker push forge.quinefoundation.com/ironmagma/$(SITE)-quineglobal-com
.PHONY: cover
cover:
go tool cover -html=cover.out
.PHONY: css
css:
npm run css
.PHONY: css-watch
css-watch:
npm run css:watch
.PHONY: dev
dev:
@trap 'kill 0' SIGINT SIGTERM; npm run css:watch & go run ./sites/$(SITE)/cmd; wait
.PHONY: install
install:
npm install
.PHONY: lint
lint:
golangci-lint run
.PHONY: start
start:
go run ./sites/$(SITE)/cmd
.PHONY: test
test:
go test -coverprofile=cover.out -shuffle on ./...