fix(docker): track setup-workspace.sh for clean remote builds
setup-workspace.sh was gitignored but required by Dockerfile COPY. Building from a fresh clone would fail. Now tracked. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3b45824dc6
commit
7a1dc3ea2c
+1
-1
@@ -66,4 +66,4 @@ aipass_json/
|
||||
# Claude local settings (per-branch, not source code)
|
||||
.claude/
|
||||
|
||||
setup-workspace.sh
|
||||
# setup-workspace.sh — tracked, needed for Docker build
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
WORKSPACE="/home/coder/workspace"
|
||||
PROJECT="$WORKSPACE/AIPass"
|
||||
FORK="git@github.com:Input-X/AIPass.git"
|
||||
UPSTREAM="git@github.com:AIOSAI/AIPass.git"
|
||||
|
||||
export PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# Ensure workspace directory exists and is writable
|
||||
mkdir -p "$WORKSPACE"
|
||||
if [ ! -w "$WORKSPACE" ]; then
|
||||
echo "==> Fixing workspace permissions..."
|
||||
sudo chown -R coder:coder "$WORKSPACE"
|
||||
fi
|
||||
|
||||
# Clone repo if not already present
|
||||
if [ ! -d "$PROJECT/.git" ]; then
|
||||
echo "==> First boot: cloning into AIPass/..."
|
||||
git clone "$FORK" "$PROJECT"
|
||||
cd "$PROJECT"
|
||||
git remote add upstream "$UPSTREAM"
|
||||
echo "==> Installing AIPass in editable mode..."
|
||||
pip install -e .
|
||||
echo "==> Workspace ready!"
|
||||
echo "==> origin = $FORK (your fork - push here)"
|
||||
echo "==> upstream = $UPSTREAM (pull updates from here)"
|
||||
else
|
||||
echo "==> Workspace exists, ensuring deps are installed..."
|
||||
cd "$PROJECT"
|
||||
pip install -e . 2>/dev/null || true
|
||||
fi
|
||||
Reference in New Issue
Block a user