pcbjam/scripts/git-workflow/for-each-repo.sh
Gergő Törcsvári 0665b30762
chore(skills): include pcbjam-shared in the git-feature workflow
The pcbjam repo's own git-feature skills + scripts/git-workflow predated the
web/pcbjam-shared submodule and only covered root+kicad+wxwidgets. Add the MIT
contract repo as a fourth member everywhere:

- repos.sh: pcbjam_shared key (path web/pcbjam-shared, main `main`) + layout doc.
- assert-clean.sh / for-each-repo.sh: count-agnostic wording.
- git-feature-start/commit/sync/finish SKILL.md: pcbjam-shared in the branch /
  commit (kicad, wxwidgets, pcbjam-shared, then root) / rebase (root first) /
  finish orders; root pointer-bump staging + diff now include web/pcbjam-shared,
  and the root stage step excludes it like the other submodule trees.

Mirrors the root pcbjam-private skills, which already covered shared.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 14:05:40 +02:00

26 lines
659 B
Shell
Executable file

#!/bin/bash
# Run a git command in each repo of the 4-repo tree. Echoes before each run.
# Usage: ./for-each-repo.sh <git-subcommand-and-args>
# e.g. ./for-each-repo.sh status --short
# ./for-each-repo.sh fetch origin
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=./repos.sh
source "$SCRIPT_DIR/repos.sh"
if [ $# -eq 0 ]; then
echo "Usage: $0 <git-subcommand> [args...]" >&2
exit 2
fi
for repo in "${REPOS[@]}"; do
p=$(repo_path "$repo")
echo "=== $repo ($p) ==="
echo "+ git -C $p $*"
if ! git -C "$p" "$@"; then
echo "FAILED in repo: $repo" >&2
exit 1
fi
done