| 1 | # docs is script-driven, not make-driven: the gate is .amadan/ci.d/10-gate |
| 2 | # and the release build is scripts/build-release.sh, which builds from a |
| 3 | # `git archive` of the revision rather than from the working tree — so a |
| 4 | # release can never pick up an uncommitted edit, and there is no |
| 5 | # dirty-tree case to refuse. |
| 6 | # |
| 7 | # This Makefile exists so that `make release` means the same thing in |
| 8 | # docs as it does in calendar, home, meet, memoria, sheets and slides. |
| 9 | # It delegates rather than restating the build: two definitions of how |
| 10 | # docs ships would drift, and the one in the script is the one CI uses. |
| 11 | |
| 12 | APP := docs |
| 13 | RELEASE_GOOS ?= linux |
| 14 | RELEASE_GOARCH ?= arm64 |
| 15 | RELEASE_BIN := releases/$(APP)-$(RELEASE_GOOS)-$(RELEASE_GOARCH) |
| 16 | |
| 17 | .PHONY: release browser |
| 18 | |
| 19 | release: |
| 20 | @mkdir -p releases |
| 21 | GOOS=$(RELEASE_GOOS) GOARCH=$(RELEASE_GOARCH) ./scripts/build-release.sh $(RELEASE_BIN) $(REVISION) |
| 22 | @echo "publish it with:" |
| 23 | @echo " amadan release create -repo oficina/$(APP) -notes-file NOTES.md <tag> $(RELEASE_BIN)" |
| 24 | @echo "ship it declaring CARLOS mail submission, then promote it (AGENTS.md):" |
| 25 | @echo " carlos ship -app $(APP) -mail submit -target $(RELEASE_GOOS)-$(RELEASE_GOARCH) $(RELEASE_BIN)" |
| 26 | @echo " carlos promote -app $(APP) <version>" |
| 27 | |
| 28 | # The browser checks (internal/docs/*_browser_test.go), which the gate |
| 29 | # vets but cannot run: they need a Chromium (RASTRILLO_CHROME, or a |
| 30 | # Playwright cache), and the engines checks need fixtures/engines |
| 31 | # installed (cd fixtures/engines && npm ci && npx playwright install |
| 32 | # chromium webkit). Among them is TestEveryScreenKeepsTheRhythm, Fiesta's |
| 33 | # rhythm audit over every screen (AGENTS.md, "Spacing"). Run it before |
| 34 | # shipping a change to a page's CSS. On macOS, TMPDIR=/tmp keeps the |
| 35 | # unix socket paths short enough. |
| 36 | browser: |
| 37 | CGO_ENABLED=0 go test -tags browser -count=1 ./internal/docs/ |
| 38 | |