summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md10
-rw-r--r--Makefile24
-rw-r--r--scripts/hooks/pre-push5
3 files changed, 38 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..206da85
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,10 @@
+# Changelog
+
+One line per release. Versions are git tags (`vX.Y.Z`); tagging began at 0.45.0,
+so earlier history lives only in the git log.
+
+## [0.45.1] - 2026-07-29
+- Printed month calendar names the form in full: "traditional roman calendar" / "novus ordo calendar".
+
+## [0.45.0] - 2026-07-29
+- Any-language localisation (day/saint names + UI chrome as data), bible-corpora licence split (only the Vulgate embedded; wuj/drb/grb opt-in), EF Polish sanctoral complete, web top-bar rework.
diff --git a/Makefile b/Makefile
index 4719a6d..5fc9b59 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ PREFIX ?= $(HOME)/.local
BINDIR := $(PREFIX)/bin
MANDIR := $(PREFIX)/share/man/man1
-.PHONY: help build build-full install install-full uninstall test vet fmt clean cross check-corpora add-corpus
+.PHONY: help build build-full install install-full uninstall test vet fmt clean cross check-corpora add-corpus ci release install-hooks
help: ## show this help
@grep -hE '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed -E 's/:.*## /\t/' | sort
build: ## build all three binaries (embeds only the Vulgate)
@@ -40,6 +40,28 @@ vet: ## go vet
go vet ./...
fmt: ## gofmt the tree
gofmt -w .
+ci: ## full pre-push gate: gofmt clean, vet, both tag sets, corpora
+ @u=$$(gofmt -l .); test -z "$$u" || { echo "gofmt needed:"; echo "$$u"; exit 1; }
+ go vet ./...
+ go test ./...
+ $(MAKE) test
+install-hooks: ## install the git pre-push hook (runs make ci)
+ @mkdir -p .git/hooks
+ @cp scripts/hooks/pre-push .git/hooks/pre-push
+ @chmod +x .git/hooks/pre-push
+ @echo "installed .git/hooks/pre-push -> runs 'make ci' (bypass a push with --no-verify)"
+release: ## cut a release: make release VERSION=0.46.0 (add its CHANGELOG line first)
+ @test -n "$(VERSION)" || { echo "set VERSION=X.Y.Z" >&2; exit 2; }
+ @echo "$(VERSION)" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$$' || { echo "VERSION must be X.Y.Z" >&2; exit 2; }
+ @test -z "$$(git status --porcelain)" || { echo "working tree not clean; commit or stash first" >&2; exit 2; }
+ @grep -q '## \[$(VERSION)\]' CHANGELOG.md || { echo "add a one-line CHANGELOG.md entry under '## [$(VERSION)]' first" >&2; exit 2; }
+ @sed -i 's/^const Version = ".*"/const Version = "$(VERSION)"/' internal/config/config.go
+ @grep -q 'const Version = "$(VERSION)"' internal/config/config.go || { echo "version bump failed" >&2; exit 2; }
+ $(MAKE) ci
+ git add internal/config/config.go CHANGELOG.md
+ git commit -m "release: v$(VERSION)"
+ git tag -a "v$(VERSION)" -m "lectio $(VERSION)"
+ @echo "tagged v$(VERSION). publish with: git push origin main v$(VERSION)"
clean: ## remove build artifacts
rm -f $(LECTIO) $(LECTIO_UI) $(LECTIO_WEB); rm -rf dist
cross: ## cross-compile into dist/
diff --git a/scripts/hooks/pre-push b/scripts/hooks/pre-push
new file mode 100644
index 0000000..c4fbcaf
--- /dev/null
+++ b/scripts/hooks/pre-push
@@ -0,0 +1,5 @@
+#!/bin/sh
+# lectio pre-push hook: refuse to push if the CI gate fails (gofmt, vet, both
+# build-tag test sets, corpora). Install with `make install-hooks`.
+# Bypass in a pinch with `git push --no-verify`.
+exec make -C "$(git rev-parse --show-toplevel)" ci