Files
skillshare/scripts/sandbox_playground_down.sh
T
Willie 3830543309 feat: auto-commit and auto-pull on init, improve git UX
Init now creates an initial commit (including .gitignore) so that
push/pull work immediately after setup. When a remote is configured,
init fetches and auto-pulls existing skills from the remote.

- Always create initial commit in doGitInit (fixes stale untracked
  .gitignore blocking pull)
- Add ensureGitIdentity: set repo-local fallback when git user.name
  is not configured, with hint to set global config
- Add tryPullAfterRemoteSetup: fetch remote after adding origin,
  auto-pull if remote has content and local is empty
- Add hintGitRemoteError: context-aware hints for SSH, URL, and
  network errors in push/pull
- Show Pro tip only when built-in skill is installed
- Sandbox: add --bare mode (skip auto-init), --volumes for down
  (full reset), and sandbox-reset / sandbox:reset targets
- Docs: update init flow diagram, cross-machine-sync guide,
  push/pull prerequisites, getting-started, troubleshooting
2026-02-13 14:21:36 +08:00

25 lines
773 B
Bash
Executable File

#!/usr/bin/env bash
# Stop and remove the Docker playground container.
# Usage: ./sandbox_playground_down.sh [--volumes]
# --volumes Also remove the playground-home volume (full reset)
set -euo pipefail
source "$(dirname "$0")/_sandbox_common.sh"
REMOVE_VOLUMES=false
for arg in "$@"; do
case "$arg" in
--volumes|-v) REMOVE_VOLUMES=true ;;
esac
done
require_docker
cd "$PROJECT_ROOT"
docker compose -f "$COMPOSE_FILE" --profile playground stop sandbox-playground
docker compose -f "$COMPOSE_FILE" --profile playground rm -f sandbox-playground
if [ "$REMOVE_VOLUMES" = true ]; then
echo "Removing playground-home volume..."
docker volume rm skillshare_playground-home 2>/dev/null && echo "Volume removed." || echo "Volume not found (already removed)."
fi