gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchday39cfe95440|||PR day39 re-vendor: Hybriel 51e921d7 (bin 6b481aa7), ids kebab-case since hybriel#256: quoted state rule and tests use jb-shuffle / jb-repeatmreday39/tools/sync-components.sh

2.9 KB

  1. #!/usr/bin/env bash
  2. # tools/sync-components.sh — copy the components.hybriel.worldapi.org blocks jukebox uses, BYTE-VERBATIM from a commit
  3. # (mission JB2; the model is layouts.worldapi.org's tools/sync-components.sh).
  4. # tools/sync-components.sh [46fefaa] copy pinned icons and the player (c96709c); virtual list e5b98ec
  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 "Files").
  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: the media player, the virtual list and the icons: each block own file + README (no demo.hl).
  13. FILES=(
  14. media-player/media-player.hl media-player/README.md
  15. virtual-list/virtual-list.hl virtual-list/README.md
  16. icons/icons.hl icons/README.md
  17. )
  18. # a git worktree has a .git FILE, a clone a .git directory: either is a repo
  19. [ -e "$SRC/.git" ] || { echo "no git repo at $SRC (set COMPONENTS_REPO)"; exit 2; }
  20. if [ "${1:-}" = "--check" ]; then
  21. REF="$(head -n1 "$APP/components/SOURCE" | cut -d' ' -f1)"
  22. bad=0
  23. for f in "${FILES[@]}"; do
  24. repo="$SRC"
  25. ref="$REF"
  26. case "$f" in
  27. icons/*) ref="46fefaa" ;;
  28. media-player/*) ref="c96709c" ;;
  29. virtual-list/*) ref="e5b98ec" ;;
  30. esac
  31. if ! git -C "$repo" show "$ref:components/$f" | cmp -s - "$APP/components/$f"; then echo "DIFFERS: components/$f (vs $ref)"; bad=1; fi
  32. done
  33. [ $bad = 0 ] && echo "verbatim: icons 46fefaa; virtual-list e5b98ec; media-player c96709c (${#FILES[@]} files)"
  34. exit $bad
  35. fi
  36. REF="$(git -C "$SRC" rev-parse --short "${1:-46fefaa}^{commit}")"
  37. [ "$REF" = "46fefaa" ] || { echo "icons are pinned to 46fefaa; update the provenance check before changing the pin"; exit 2; }
  38. for f in icons/icons.hl icons/README.md; do
  39. mkdir -p "$APP/components/$(dirname "$f")"
  40. git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"
  41. done
  42. printf 'e5b98ec virtual-list from components.hybriel\n46fefaa icons from components.hybriel\nc96709c media-player from components.hybriel (skip and repeat options)\n' > "$APP/components/SOURCE"
  43. for f in media-player/media-player.hl media-player/README.md; do
  44. mkdir -p "$APP/components/$(dirname "$f")"
  45. git -C "$SRC" show "c96709c:components/$f" > "$APP/components/$f"
  46. done
  47. for f in virtual-list/virtual-list.hl virtual-list/README.md; do
  48. mkdir -p "$APP/components/$(dirname "$f")"
  49. git -C "$SRC" show "e5b98ec:components/$f" > "$APP/components/$f"
  50. done
  51. echo "copied 2 icon files from components.hybriel $REF, 2 media-player files from c96709c and 2 virtual-list files from e5b98ec"
  52. "$0" --check

Branches

Latest commits

  • cfe95440|||PR day39 re-vendor: Hybriel 51e921d7 (bin 6b481aa7), ids kebab-case since hybriel#256: quoted state rule and tests use jb-shuffle / jb-repeatmre
  • f3614c9bRe-vendor to Hybriel day39 (51e921d7, bin 6b481aa7)mre
  • 9f5c6532Merge branch 'status-22-pr' into mainJukebox
  • 5838d6c7|||PR STATUS: #22 pending decision, PR-only rulemre
  • 29d2029cRecords: PR-only rule (Kunibert)mre
  • adacb0abRecords: neutral ticket rule, #22 decision recordedmre
  • b2d6f121Records: #308 hold liftedmre
  • 7ab67533Records: day39 on hold (hybriel#308)mre
  • 22f21739Records: note rebase before mergemre
  • f7368ea3Records: mission 011 day39, waits for lisbethmre
  • 9515d2cdRecords: jb20 livemre
  • 019f6601ui gate: comment names the open bug components#27 (workaround, not fixed)mre
  • 277a2722README: provenance linemre
  • 4169ca6aREADME: sync pinmre
  • a01f3aa8ui gate: back to the top before the sort checks (the screen reopens where it was left)mre
  • f7936c20Lists keep their scroll position across a reload (jukebox#20): per-list offsets in storage/ui.json, gate jb20mre
  • d67906devirtual-list and icons from components.hybriel e5b98ec (centerId, scrollTop, onScroll)mre
  • df7920ceRecords: R3 startedmre
  • 0549f038Mission 010: jb20 livemre
  • 273494e2STATUS rewrittenmre