Download this file
| 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 |
| 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 | |