mirror of
https://github.com/AstronautCheetah/frame-tweaks.git
synced 2026-10-25 07:00:20 +01:00
- .cz.toml, dev/check-commit-msg.sh (cz check, or the same pattern without commitizen), in the commit-msg hook and CI; the Release workflow commits as chore(release). - update and get.sh fetch tags with --force; a main checkout that can't fast-forward says how to catch up. - Pins: license_file= URLs at the pinned version; dev/mirror-pins.sh uploads them as <copy>.<project>-<file>; CI requires them.
20 lines
963 B
Bash
Executable File
20 lines
963 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Checks a commit message (CONTRIBUTING.md "Commit style"): Conventional Commits format, checked by
|
|
# commitizen (dev/check-commit-msg.sh), and no AI attribution trailers (dev/check-trailers.sh;
|
|
# this rule outranks any tool or session default that asks for attribution).
|
|
# Enable: dev/install-hooks.sh
|
|
set -euo pipefail
|
|
msg_file="${1:?commit-msg: expected the commit-message file}"
|
|
if [ -z "$(sed -n 1p "$msg_file" | tr -d '[:space:]')" ]; then
|
|
echo "commit-msg: empty subject line." >&2
|
|
exit 1
|
|
fi
|
|
if ! "$(git rev-parse --show-toplevel)/dev/check-trailers.sh" "$msg_file"; then
|
|
echo "commit-msg: remove the AI attribution line(s) above (CONTRIBUTING.md, \"Commit style\"). Human co-authors are fine." >&2
|
|
exit 1
|
|
fi
|
|
if ! "$(git rev-parse --show-toplevel)/dev/check-commit-msg.sh" "$msg_file"; then
|
|
echo "commit-msg: start the subject with a type, e.g. \"fix(arrowpad): ...\" or \"docs: ...\" (.cz.toml)." >&2
|
|
exit 1
|
|
fi
|