Add deploy_shell.sh for deploying wwwroot shell files
This script copies index.ui and global_menu.ui from git repo to production wwwroot (which is gitignored).
This commit is contained in:
parent
da47ad0cdb
commit
acb5eb29f9
49
script/deploy_shell.sh
Normal file
49
script/deploy_shell.sh
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Deploy sage shell files to production wwwroot
|
||||||
|
# Usage: bash ~/sage/script/deploy_shell.sh
|
||||||
|
#
|
||||||
|
# This script copies index.ui and global_menu.ui from the git repo
|
||||||
|
# to the production wwwroot directory (which is gitignored).
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SAGE_DIR="${SAGE_HOME:-$HOME/sage}"
|
||||||
|
SAGE_WWWROOT="$SAGE_DIR/wwwroot"
|
||||||
|
SAGE_REPO="$HOME/repos/sage/wwwroot"
|
||||||
|
|
||||||
|
echo "Deploying sage shell files..."
|
||||||
|
echo "Source: $SAGE_REPO"
|
||||||
|
echo "Target: $SAGE_WWWROOT"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Ensure wwwroot exists
|
||||||
|
mkdir -p "$SAGE_WWWROOT"
|
||||||
|
|
||||||
|
# Copy index.ui
|
||||||
|
if [ -f "$SAGE_REPO/index.ui" ]; then
|
||||||
|
cp "$SAGE_REPO/index.ui" "$SAGE_WWWROOT/index.ui"
|
||||||
|
echo "✓ index.ui (Shell layout with sidebar)"
|
||||||
|
else
|
||||||
|
echo "✗ index.ui not found in $SAGE_REPO"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy global_menu.ui
|
||||||
|
if [ -f "$SAGE_REPO/global_menu.ui" ]; then
|
||||||
|
cp "$SAGE_REPO/global_menu.ui" "$SAGE_WWWROOT/global_menu.ui"
|
||||||
|
echo "✓ global_menu.ui (Global navigation menu)"
|
||||||
|
else
|
||||||
|
echo "✗ global_menu.ui not found in $SAGE_REPO"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove old symlinks if exist
|
||||||
|
rm -f "$SAGE_WWWROOT/dashboard_for_sage" 2>/dev/null || true
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Deployed to $SAGE_WWWROOT/"
|
||||||
|
echo ""
|
||||||
|
echo "Next steps:"
|
||||||
|
echo " 1. cd ~/repos/dashboard_for_sage && git pull"
|
||||||
|
echo " 2. cd ~/repos/bricks && git pull && bash build.sh"
|
||||||
|
echo " 3. cd ~/sage && ./stop.sh && ./start.sh"
|
||||||
Loading…
x
Reference in New Issue
Block a user