gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commita5d45d00a5d45d00records: D38 cause, GOmrea5d45d00/tools/sync-components.sh

2.2 KB

  1. #!/usr/bin/env bash
  2. # tools/sync-components.sh — copy the components.hybriel.worldapi.org blocks tickets uses, BYTE-VERBATIM from a commit
  3. # (mission 016; the model is layouts.worldapi.org's tools/sync-components.sh).
  4. # tools/sync-components.sh [commit] copy from <commit> (default: HEAD of the source repo), write components/SOURCE
  5. # tools/sync-components.sh --check compare the copies with the commit in components/SOURCE (exit 1 on any difference)
  6. # Source repo: $COMPONENTS_REPO (default loreana /media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org). The files come out of
  7. # git (`git show <commit>:<path>`), not the working tree, so uncommitted edits there never land here. Never edit the copies:
  8. # change them in components.hybriel, commit there, run this, then the gates (README "Comments").
  9. set -euo pipefail
  10. APP="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
  11. SRC="${COMPONENTS_REPO:-/media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org}"
  12. # what is copied: each block's own file + README (no demo.hl). comments.hl imports ../md-editor/md-editor.hl and (mission 017,
  13. # attachments) ../files-upload/files-upload.hl; md-editor and files-upload import ../icons/icons.hl (F4, the shared Icon).
  14. FILES=(
  15. comments/comments.hl comments/README.md
  16. md-editor/md-editor.hl md-editor/README.md
  17. icons/icons.hl icons/README.md
  18. files-upload/files-upload.hl files-upload/README.md
  19. )
  20. # a git worktree has a .git FILE, a clone a .git directory: either is a repo
  21. [ -e "$SRC/.git" ] || { echo "no git repo at $SRC (set COMPONENTS_REPO)"; exit 2; }
  22. if [ "${1:-}" = "--check" ]; then
  23. REF="$(head -n1 "$APP/components/SOURCE" | cut -d' ' -f1)"
  24. bad=0
  25. for f in "${FILES[@]}"; do
  26. if ! git -C "$SRC" show "$REF:components/$f" | cmp -s - "$APP/components/$f"; then echo "DIFFERS: components/$f (vs $REF)"; bad=1; fi
  27. done
  28. [ $bad = 0 ] && echo "verbatim: ${#FILES[@]} files = components.hybriel $REF"
  29. exit $bad
  30. fi
  31. REF="$(git -C "$SRC" rev-parse --short "${1:-HEAD}^{commit}")"
  32. for f in "${FILES[@]}"; do
  33. mkdir -p "$APP/components/$(dirname "$f")"
  34. git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"
  35. done
  36. echo "$REF $(git -C "$SRC" log -1 --format='%cs %s' "$REF")" > "$APP/components/SOURCE"
  37. echo "copied ${#FILES[@]} files from components.hybriel $REF"
  38. "$0" --check

Branches

Latest commits

  • a5d45d00records: D38 cause, GOmre
  • 19eeb938records: D38 gates, two day38b failuresmre
  • 94d6ca2arecords: D38 startedmre
  • 9df09aacmission 029: day38b re-vendor + deploymre
  • d2834f65records: #94 backup planmre
  • 4467d8cbrecords: #94 purge readymre
  • 506a4efdmission 028: #94, identity rulemre
  • 78c7f48eRefine mpackdb holdmre
  • 3d7d89c8Record mpackdb hold until day38mre
  • f1bf7195#51 done; my subscription idmre
  • 9870b945status: #51 proof greenmre
  • e92173c6log: #51 live push proofmre
  • 72d87041log: Hermes push livemre
  • 1d69bf7dTickets conductor: park until Hermes pushmre
  • 80d8cfd1Tickets conductor: #51 livemre
  • 61641dd9Complete subscriptions deployment evidencemre
  • c980856cRecord successful subscriptions deployment and live checksmre
  • 4b4710adMerge branch 's51-subscriptions'mre
  • a731ef7eTickets conductor: S51 reviewed, deploy stepmre
  • b487b05aRecord verified direct push protocol handoffmre