make: Add git-log targets and record last successful run #111

Merged
Jan Lindemann merged 2 commits from jan/feature/20260916-make-add-git-log-targets-and-record-last-successful-run into master 2026-09-16 18:26:31 +02:00 AGit

2026-09-16

run-success.mk: Record last successful run
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m27s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m43s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m16s
CI / Packaging test (push) Successful in 0s
Add a run-success.mk which provides a $(RUN_SUCCESS_CREATE_MARKER)
variable, and include it from run.mk and py-run.mk. If it's not overridden,
it logs the current commit to a marker file if the run succeeds. The marker
file is ignored from Git and cleaned in the context of the distclean
target.

The machinery can be customized by variables:

  RUN_SUCCESS_MARKER is the name of the marker file
  RUN_SUCCESS_RECORD_CMD is the generator for its content

For example, putting this into local.mk or jw-pkg/make/local.mk will record
the hashes of every repository in the entire workspace:

  define RUN_SUCCESS_RECORD_CMD
  make git-log-1
  make git-log-tree-1
  endef

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-16 18:16:17 +02:00
rules.mk, projects-dir.mk: Add git-log targets
The git targets of the workspace Makefile cover push, diff, and status, but
not history: inspecting commits means running git log by hand in a project
directory, and no target shows the history of all projects of a tree at
once.

Add git-log targets at both levels; the target suffix is passed to git log
as-is, so make git-log-5 asks for the last five commits.

- git-log-% in projects-dir.mk runs pgit.sh log over every project of the
  tree, one section per project
- git-log-% in rules.mk runs git log -$* in the current project directory
- git-log-tree-% in rules.mk runs git-log-$* in $(PROJECTS_DIR), giving the
  whole-tree view from inside a project; it prints a notice if PROJECTS_DIR
  is missing

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1
2026-09-16 18:16:17 +02:00