2026-05-10 14:05:17 +00:00
|
|
|
#!/bin/sh
|
v3.0.0 release: promote bundle, purge v2 traces, refresh docs
manifest: 2.30.14 -> 3.0.0; theme.css promoted from dist/theme-v3.css (zero declaration-level !important; fingerprint diff Light/Dark = 0). Delete dev/ tree, v2 scripts, v2 docs, v2 fixtures, v2 release artifacts, v2 screenshots. Rewrite scripts/build_release.py and scripts/sync_obsidian_theme.py to v3 toolchain. Inline live_preview_hit_routing_audit and duplicate-selector tokenizer (validate_theme.py and find_safe_duplicate_selectors.py removed). Refresh README.md, CHANGELOG.md, CONTRIBUTING.md, screenshots/README.md, docs/v3/{release-plan,live-preview-editability,golden-image-scenarios,design-spec}.md. Bundle 16509 lines, hit-routing clean, dist/Owen-Graphite-3.0.0.zip (202KB). NOTE: .github/workflows/{validate,release}.yml updates are in a follow-up commit because the current OAuth token lacks 'workflow' scope.
2026-05-16 03:47:50 +00:00
|
|
|
# Owen Graphite v3 pre-commit hook
|
2026-05-17 00:31:23 +00:00
|
|
|
# - builds ignored dist/theme-v3.css from src/ and verifies freshness
|
|
|
|
|
# - verifies root theme.css matches the fresh bundle
|
2026-05-17 00:50:11 +00:00
|
|
|
# - checks release metadata, Style Settings, docs/assets, and CSS compatibility budget
|
v3.0.0 release: promote bundle, purge v2 traces, refresh docs
manifest: 2.30.14 -> 3.0.0; theme.css promoted from dist/theme-v3.css (zero declaration-level !important; fingerprint diff Light/Dark = 0). Delete dev/ tree, v2 scripts, v2 docs, v2 fixtures, v2 release artifacts, v2 screenshots. Rewrite scripts/build_release.py and scripts/sync_obsidian_theme.py to v3 toolchain. Inline live_preview_hit_routing_audit and duplicate-selector tokenizer (validate_theme.py and find_safe_duplicate_selectors.py removed). Refresh README.md, CHANGELOG.md, CONTRIBUTING.md, screenshots/README.md, docs/v3/{release-plan,live-preview-editability,golden-image-scenarios,design-spec}.md. Bundle 16509 lines, hit-routing clean, dist/Owen-Graphite-3.0.0.zip (202KB). NOTE: .github/workflows/{validate,release}.yml updates are in a follow-up commit because the current OAuth token lacks 'workflow' scope.
2026-05-16 03:47:50 +00:00
|
|
|
# - runs the Live Preview hit-routing audit
|
2026-05-16 21:13:08 +00:00
|
|
|
# - runs the PDF header/footer marginalia audit
|
v3.0.0 release: promote bundle, purge v2 traces, refresh docs
manifest: 2.30.14 -> 3.0.0; theme.css promoted from dist/theme-v3.css (zero declaration-level !important; fingerprint diff Light/Dark = 0). Delete dev/ tree, v2 scripts, v2 docs, v2 fixtures, v2 release artifacts, v2 screenshots. Rewrite scripts/build_release.py and scripts/sync_obsidian_theme.py to v3 toolchain. Inline live_preview_hit_routing_audit and duplicate-selector tokenizer (validate_theme.py and find_safe_duplicate_selectors.py removed). Refresh README.md, CHANGELOG.md, CONTRIBUTING.md, screenshots/README.md, docs/v3/{release-plan,live-preview-editability,golden-image-scenarios,design-spec}.md. Bundle 16509 lines, hit-routing clean, dist/Owen-Graphite-3.0.0.zip (202KB). NOTE: .github/workflows/{validate,release}.yml updates are in a follow-up commit because the current OAuth token lacks 'workflow' scope.
2026-05-16 03:47:50 +00:00
|
|
|
# - runs the duplicate-selector audit (informational)
|
2026-05-10 14:05:17 +00:00
|
|
|
# Install with:
|
2026-05-16 20:48:37 +00:00
|
|
|
# ln -sf ../../dev/scripts/hooks/pre-commit .git/hooks/pre-commit
|
|
|
|
|
# chmod +x dev/scripts/hooks/pre-commit
|
2026-05-10 14:05:17 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
repo_root=$(git rev-parse --show-toplevel)
|
|
|
|
|
cd "$repo_root"
|
|
|
|
|
|
|
|
|
|
if [ -x .venv/bin/python ]; then
|
|
|
|
|
PY=.venv/bin/python
|
v3.0.0 release: promote bundle, purge v2 traces, refresh docs
manifest: 2.30.14 -> 3.0.0; theme.css promoted from dist/theme-v3.css (zero declaration-level !important; fingerprint diff Light/Dark = 0). Delete dev/ tree, v2 scripts, v2 docs, v2 fixtures, v2 release artifacts, v2 screenshots. Rewrite scripts/build_release.py and scripts/sync_obsidian_theme.py to v3 toolchain. Inline live_preview_hit_routing_audit and duplicate-selector tokenizer (validate_theme.py and find_safe_duplicate_selectors.py removed). Refresh README.md, CHANGELOG.md, CONTRIBUTING.md, screenshots/README.md, docs/v3/{release-plan,live-preview-editability,golden-image-scenarios,design-spec}.md. Bundle 16509 lines, hit-routing clean, dist/Owen-Graphite-3.0.0.zip (202KB). NOTE: .github/workflows/{validate,release}.yml updates are in a follow-up commit because the current OAuth token lacks 'workflow' scope.
2026-05-16 03:47:50 +00:00
|
|
|
elif [ -x .venv/Scripts/python.exe ]; then
|
|
|
|
|
PY=.venv/Scripts/python.exe
|
2026-05-10 14:05:17 +00:00
|
|
|
else
|
|
|
|
|
PY=python3
|
|
|
|
|
fi
|
|
|
|
|
|
2026-05-24 13:39:20 +00:00
|
|
|
changed=$(git diff --cached --name-only)
|
|
|
|
|
|
|
|
|
|
"$PY" dev/scripts/validation_plan.py --run-safe
|
|
|
|
|
|
|
|
|
|
if printf '%s\n' "$changed" | grep -Eq '^(src/|theme\.css|manifest\.json|CHANGELOG\.md|README\.md|screenshots/|dev/WIKI/MAP/)'; then
|
|
|
|
|
"$PY" dev/scripts/bundle_v3.py
|
|
|
|
|
"$PY" dev/scripts/bundle_v3.py --check
|
|
|
|
|
"$PY" - <<'PY'
|
2026-05-17 00:31:23 +00:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
theme = Path("theme.css").read_text(encoding="utf-8")
|
|
|
|
|
bundle = Path("dist/theme-v3.css").read_text(encoding="utf-8")
|
|
|
|
|
if theme != bundle:
|
|
|
|
|
raise SystemExit("theme.css is stale vs dist/theme-v3.css; promote and stage the fresh bundle copy")
|
|
|
|
|
PY
|
2026-05-24 13:39:20 +00:00
|
|
|
"$PY" dev/scripts/release_check.py --skip-bundle
|
|
|
|
|
else
|
|
|
|
|
"$PY" dev/scripts/audit_docs_assets.py
|
|
|
|
|
"$PY" dev/scripts/audit_wiki_consistency.py
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
"$PY" dev/scripts/audit_runtime_evidence_requirements.py --strict || {
|
|
|
|
|
echo "Runtime evidence strict check failed. Add evidence or avoid claiming runtime correctness." >&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
v3.0.0 release: promote bundle, purge v2 traces, refresh docs
manifest: 2.30.14 -> 3.0.0; theme.css promoted from dist/theme-v3.css (zero declaration-level !important; fingerprint diff Light/Dark = 0). Delete dev/ tree, v2 scripts, v2 docs, v2 fixtures, v2 release artifacts, v2 screenshots. Rewrite scripts/build_release.py and scripts/sync_obsidian_theme.py to v3 toolchain. Inline live_preview_hit_routing_audit and duplicate-selector tokenizer (validate_theme.py and find_safe_duplicate_selectors.py removed). Refresh README.md, CHANGELOG.md, CONTRIBUTING.md, screenshots/README.md, docs/v3/{release-plan,live-preview-editability,golden-image-scenarios,design-spec}.md. Bundle 16509 lines, hit-routing clean, dist/Owen-Graphite-3.0.0.zip (202KB). NOTE: .github/workflows/{validate,release}.yml updates are in a follow-up commit because the current OAuth token lacks 'workflow' scope.
2026-05-16 03:47:50 +00:00
|
|
|
|