clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

feat/atlas-next-horizon
atlas / Makefile
Makefile 4.8K
1# The test surface and the guardrails.2#3# These targets are the enforcement surface; the existing build recipes are4# untouched and still live where they always did.56.PHONY: test test-e2e release-packaging corpus-smoke spec depcheck lint-lanes analysis-lane render-lane seam seam-watch static serve-static desktop78# The one entrypoint: every required gate, and nothing that can silently9# decline to judge. Go tests run through tools/testgate, which fails the run10# if any test skipped; the lanes run their own boundary rules, type checks and11# suites; depcheck holds the import matrix. What CI runs is this, spelled out12# step by step in .github/workflows/ci.yml because the Windows runner has no13# make.14test:15 go vet ./...16 go run ./tools/testgate ./...17 npm run --silent lane18 npm run --silent seam-lane19 go run ./tools/depcheck20 $(MAKE) release-packaging2122# The application in a real browser, over a registry packed from the committed23# corpus. Needs a Playwright Chromium (npx playwright install chromium); every24# other prerequisite is built by the target itself.25test-e2e: static26 go run ./tests/e2e/prep27 npx playwright test --config tests/e2e/playwright.config.ts2829# Native packaging is executable release policy: every OS declares the same30# .atlas identity, and publication stays draft-first until exact assets match.31# This is static and hermetic; platform runners smoke the installers themselves.32release-packaging:33 PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests/release/test_packaging.py3435# The maintainer's deep check, and deliberately not a CI gate: walk a real36# installed library and hold every current-format bundle to the reader's37# invariants. Compares no stamps, no hashes, no content.38corpus-smoke:39 go run ./tools/corpussmoke4041# The semantic conventions, from their one machine-readable source: the Go42# registry, the TypeScript lanes' key constants, and the document a reader43# learns the vocabulary from. `go generate ./format/semconv` is the same run.44# spec/gen's own test checks that what is committed is what this would write.45spec:46 go run ./spec/gen4748# The guardrails alone: the lane import matrix, hostenv purity, network49# confinement, semconv discipline.50depcheck:51 go run ./tools/depcheck5253# The TypeScript half of the same boundaries, over both lanes.54lint-lanes:55 npx eslint --config eslint.config.mjs analysis render5657# The analysis lane's own gate: the boundary rules, the type checker at its58# strictest, and the conformance suite over every registered system. `make59# test` runs the same thing; this target is the one lane on its own.60analysis-lane:61 npm run --silent lane6263# The seam's own gate: the same boundary rules, the type checker, the seam's64# unit tests against the corpus and its stated models, and the authored-line65# budget as a warning. `make test` runs the same thing.66render-lane:67 npm run --silent seam-lane6869# The seam's built output: one JavaScript file, from one entry point.70seam:71 npm run --silent seam-build7273# The same, rebuilt on every save. `atlas dev -seam-watch` runs this.74seam-watch:75 npm run --silent watch --workspace @atlas/render7677# The tree a host mounts at /static: the seam's bundle as `app.js`, which is78# the one file the shell's script tag asks for. The stylesheet system is NOT79# here -- it is the application's own asset, served from /assets by the80# application itself, which is what makes deleting this lane cost a page one81# script tag rather than its chrome.82#83# It is installed in two places because two hosts want it in two shapes.84# dist/static is the build output a `-static` mount is pointed at, and is what85# the e2e run serves (tests/e2e/playwright.config.ts). static/ is86# the tree the desktop shell embeds (`//go:embed static` in main.go), so that87# the shipped application is one file; see static/README.md. Same bytes, one88# build.89static: seam90 mkdir -p dist/static91 cp render/dist/app.js dist/static/app.js92 cp render/dist/app.js static/app.js9394# The smoke run: the real application, the real registry, and the seam mounted95# where the page looks for it. Read-only against the library.96serve-static: static97 go run ./cmd/atlas serve -static dist/static9899# The desktop shell (issue #5 ยง3.4): the application in a window, one file,100# seam embedded. This is the macOS recipe -- the same `go build` .github/101# workflows/release.yml runs, plus the bundle directory macOS wants before it102# will treat a binary as an application. Linux and Windows need no bundle and103# only the `go build` line, with the tags the release workflow spells.104#105# It is `go build`, not `wails build`: the Wails CLI scaffolds and drives a106# Vite frontend, and this tree serves its own pages. There is no wails.json107# for the same reason.108desktop: static109 go build -tags "desktop,production" -ldflags "-s -w" -o Atlas .110 mkdir -p Atlas.app/Contents/MacOS111 cp Atlas Atlas.app/Contents/MacOS/Atlas112 sed 's/@VERSION@/0.0.0/g' packaging/macos/Info.plist > Atlas.app/Contents/Info.plist