jukebox
All repositories: gitoria
2.9 KB
#!/usr/bin/env bash# tools/sync-components.sh — copy the components.hybriel.worldapi.org blocks jukebox uses, BYTE-VERBATIM from a commit# (mission JB2; the model is layouts.worldapi.org's tools/sync-components.sh).# tools/sync-components.sh [46fefaa] copy pinned icons and the player (c96709c); virtual list e5b98ec# tools/sync-components.sh --check compare the copies with the commit in components/SOURCE (exit 1 on any difference)# Source repo: $COMPONENTS_REPO (default loreana /media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org). The files come out of# git (`git show <commit>:<path>`), not the working tree, so uncommitted edits there never land here. Never edit the copies:# change them in components.hybriel, commit there, run this, then the gates (README "Files").set -euo pipefailAPP="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"SRC="${COMPONENTS_REPO:-/media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org}"# what is copied: the media player, the virtual list and the icons: each block own file + README (no demo.hl).FILES=(media-player/media-player.hl media-player/README.mdvirtual-list/virtual-list.hl virtual-list/README.mdicons/icons.hl icons/README.md)# a git worktree has a .git FILE, a clone a .git directory: either is a repo[ -e "$SRC/.git" ] || { echo "no git repo at $SRC (set COMPONENTS_REPO)"; exit 2; }if [ "${1:-}" = "--check" ]; thenREF="$(head -n1 "$APP/components/SOURCE" | cut -d' ' -f1)"bad=0for f in "${FILES[@]}"; dorepo="$SRC"ref="$REF"case "$f" inicons/*) ref="46fefaa" ;;media-player/*) ref="c96709c" ;;virtual-list/*) ref="e5b98ec" ;;esacif ! git -C "$repo" show "$ref:components/$f" | cmp -s - "$APP/components/$f"; then echo "DIFFERS: components/$f (vs $ref)"; bad=1; fidone[ $bad = 0 ] && echo "verbatim: icons 46fefaa; virtual-list e5b98ec; media-player c96709c (${#FILES[@]} files)"exit $badfiREF="$(git -C "$SRC" rev-parse --short "${1:-46fefaa}^{commit}")"[ "$REF" = "46fefaa" ] || { echo "icons are pinned to 46fefaa; update the provenance check before changing the pin"; exit 2; }for f in icons/icons.hl icons/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"doneprintf '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"for f in media-player/media-player.hl media-player/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "c96709c:components/$f" > "$APP/components/$f"donefor f in virtual-list/virtual-list.hl virtual-list/README.md; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "e5b98ec:components/$f" > "$APP/components/$f"doneecho "copied 2 icon files from components.hybriel $REF, 2 media-player files from c96709c and 2 virtual-list files from e5b98ec""$0" --check
Branches
- code-order
- day39
- day41
- day72
- mainmain branch
- reconnect-retry
- records-1119
- records-1123
- records-day39
- records-day41
- status-22-pr
Latest commits
- d6b3e068|||PR Records: day39 live (PR #2), mission 011 PR step, statusmre
- 5fa19e89Merge branch 'day39' into mainJukebox
- 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