File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # Script to update the offline-documentation without images on gh-pages-lite branch
23
3- # This script updates the offline documentation without images, for downloading
4- # URL for the downloadable zip is linked at https://l5lua.org/download/#offline-documentation
4+ # Safety check: Make sure we're on main
5+ if [ " $( git branch --show-current) " != " main" ]; then
6+ echo " ERROR: This script must be run from the main branch."
7+ echo " Currently on: $( git branch --show-current) "
8+ exit 1
9+ fi
10+
11+ # Check for uncommitted changes
12+ if ! git diff-index --quiet HEAD --; then
13+ echo " ERROR: You have uncommitted changes. Please commit or stash them first."
14+ exit 1
15+ fi
516
617echo " Updating gh-pages-lite..."
18+
19+ # Fetch latest gh-pages
720git fetch origin gh-pages
21+
22+ # Switch to gh-pages-lite
823git checkout gh-pages-lite
9- git merge origin/gh-pages
24+
25+ # Reset to match gh-pages exactly
26+ git reset --hard origin/gh-pages
27+
28+ # Remove images
1029rm -rf assets/images/ assets/examples/ assets/tutorials/ reference/assets/
30+
31+ # Commit and push
1132git add -A
1233git commit -m " Update lite version (remove images)"
13- git push origin gh-pages-lite
34+ git push --force origin gh-pages-lite
35+
36+ # Switch back to main
1437git checkout main
38+
1539echo " Done! gh-pages-lite updated."
You can’t perform that action at this time.
0 commit comments