tickets
All repositories: gitoria
2.2 KB
#!/usr/bin/env bash# tools/sync-components.sh — copy the components.hybriel.worldapi.org blocks tickets uses, BYTE-VERBATIM from a commit# (mission 016; the model is layouts.worldapi.org's tools/sync-components.sh).# tools/sync-components.sh [commit] copy from <commit> (default: HEAD of the source repo), write components/SOURCE# 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 "Comments").set -euo pipefailAPP="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"SRC="${COMPONENTS_REPO:-/media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org}"# what is copied: each block's own file + README (no demo.hl). comments.hl imports ../md-editor/md-editor.hl and (mission 017,# attachments) ../files-upload/files-upload.hl; md-editor and files-upload import ../icons/icons.hl (F4, the shared Icon).FILES=(comments/comments.hl comments/README.mdmd-editor/md-editor.hl md-editor/README.mdicons/icons.hl icons/README.mdfiles-upload/files-upload.hl files-upload/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[@]}"; doif ! git -C "$SRC" show "$REF:components/$f" | cmp -s - "$APP/components/$f"; then echo "DIFFERS: components/$f (vs $REF)"; bad=1; fidone[ $bad = 0 ] && echo "verbatim: ${#FILES[@]} files = components.hybriel $REF"exit $badfiREF="$(git -C "$SRC" rev-parse --short "${1:-HEAD}^{commit}")"for f in "${FILES[@]}"; domkdir -p "$APP/components/$(dirname "$f")"git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"doneecho "$REF $(git -C "$SRC" log -1 --format='%cs %s' "$REF")" > "$APP/components/SOURCE"echo "copied ${#FILES[@]} files from components.hybriel $REF""$0" --check
Branches
Latest commits
- 5d144817Merge branch 'records-t40' into mainTickets
- 44ee6f06|||PR records: #43 #45 livemre
- b8fdeee9Merge branch 'p39-routes' into mainTickets
- a0187a0a|||PR Remove redundant route-order loopmre
- 369e4b9cMerge branch 'k40-lists' into mainTickets
- 9af8e780|||PR Use keyed list mutations for live ticket updatesmre
- 610d8e8aMerge branch 'records-t39' into mainTickets
- 32bcdf24|||PR records: GO P39 K40mre
- 4123c6d1Merge branch 'records-t38' into mainTickets
- cd3641a1|||PR records: day72 deploy live, tickets closedmre
- 7d44d852Merge branch 'records-t37' into mainTickets
- 926f7061|||PR records: merges, D36 deploymre
- bf58534eMerge branch 'l33-final' into mainTickets
- 759a9ac3|||PR thin login (tickets#46, #45): merge main, route entry cleanupmre
- 239436d8Merge remote-tracking branch 'origin/main' into l33-finalmre
- 5822cb3aMerge branch 'o34-clean' into mainTickets
- 0870653c|||PR offline note from __hlOnline, no polling (tickets#41)mre
- 14cf96b4Merge branch 'records-t36' into mainTickets
- 07749fa1|||PR records: day72 + #40 mergedmre
- ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre