gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitebd00b6cebd00b6cNest caller slot styles in three-panemreebd00b6c/tools/sync-components.sh

2.3 KB

  1. #!/usr/bin/env bash
  2. # tools/sync-components.sh — copy the components.hybriel.worldapi.org files this showcase uses, BYTE-VERBATIM from a commit.
  3. # tools/sync-components.sh [commit] copy from <commit> (default: HEAD of the source repo), write components/SOURCE
  4. # tools/sync-components.sh --check compare the copies with the commit in components/SOURCE (exit 1 on any difference)
  5. # Source repo: $COMPONENTS_REPO (default loreana /media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org). The files come out of
  6. # git (`git show <commit>:<path>`), not the working tree, so uncommitted edits there never land here. Never edit the copies:
  7. # change them in components.hybriel, commit there, run this, then the gate (README "Run, test, deploy").
  8. set -euo pipefail
  9. APP="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
  10. SRC="${COMPONENTS_REPO:-/media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org}"
  11. # what is copied: each component's own file + README (no demo.hl — the showcase pages are in components/showcase/)
  12. FILES=(
  13. month-view/month-view.hl month-view/clock.hl month-view/README.md
  14. date-picker/date-picker.hl date-picker/README.md
  15. range-picker/range-picker.hl range-picker/README.md
  16. pagination/pagination.hl pagination/README.md
  17. md-editor/md-editor.hl md-editor/README.md
  18. icons/icons.hl icons/README.md
  19. code-editor/code-editor.hl code-editor/README.md
  20. file-upload/file-upload.hl file-upload/README.md
  21. modal/modal.hl modal/README.md
  22. comments/comments.hl comments/README.md
  23. files-upload/files-upload.hl files-upload/README.md
  24. media-player/media-player.hl media-player/README.md
  25. )
  26. [ -d "$SRC/.git" ] || { echo "no git repo at $SRC (set COMPONENTS_REPO)"; exit 2; }
  27. if [ "${1:-}" = "--check" ]; then
  28. REF="$(head -n1 "$APP/components/SOURCE" | cut -d' ' -f1)"
  29. bad=0
  30. for f in "${FILES[@]}"; do
  31. if ! git -C "$SRC" 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: ${#FILES[@]} files = components.hybriel $REF"
  34. exit $bad
  35. fi
  36. REF="$(git -C "$SRC" rev-parse --short "${1:-HEAD}^{commit}")"
  37. for f in "${FILES[@]}"; do
  38. mkdir -p "$APP/components/$(dirname "$f")"
  39. git -C "$SRC" show "$REF:components/$f" > "$APP/components/$f"
  40. done
  41. echo "$REF $(git -C "$SRC" log -1 --format='%cs %s' "$REF")" > "$APP/components/SOURCE"
  42. echo "copied ${#FILES[@]} files from components.hybriel $REF"
  43. "$0" --check

Branches

Latest commits

  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre
  • 494d75d4Nest caller slot styles in app-sidebarmre
  • e5571680Align all plugin sources with Hybriel day38bmre
  • 5d204c46Re-vendor layouts to Hybriel set day38bmre
  • 17e0f03eNest html-prefixed theme component overridesmre
  • e54e735eFormat plain theme elements with nested rules and bare mediamre
  • 547f834eRecord LY7 deployment and live verificationmre
  • fa4600b1Link caller-slot style exceptions to hybriel#270mre
  • 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
  • b810453etracker-demo: nest child and compound selectors in Stylemre
  • 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
  • ab22bdc2mail-demo: nest child and compound selectors in Stylemre
  • fe2d8de9home: nest child and compound selectors in Stylemre
  • e631791buser-menu: nest child and compound selectors in Stylemre
  • 69604944three-pane: nest child and compound selectors in Stylemre
  • 3e389b83main-menu: nest child and compound selectors in Stylemre
  • 05413975list-first: nest child and compound selectors in Stylemre
  • c545b642content-first: nest child and compound selectors in Stylemre
  • eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre