Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
59 lines
1.3 KiB
Bash
Executable File
59 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Watch for file changes and run CI automatically
|
|
# Usage: ./scripts/ci-watch.sh [quick|precommit]
|
|
|
|
set -euo pipefail
|
|
|
|
MODE="${1:-precommit}"
|
|
|
|
case $MODE in
|
|
quick)
|
|
CI_SCRIPT="./scripts/ci-quick.sh"
|
|
echo "👀 Watching for changes - will run quick CI..."
|
|
;;
|
|
precommit)
|
|
CI_SCRIPT="./scripts/ci-precommit.sh"
|
|
echo "👀 Watching for changes - will run pre-commit validation..."
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [quick|precommit]"
|
|
echo " precommit - Fast build/test only"
|
|
echo " quick - Quick CI pipeline"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Check if inotifywait is available
|
|
if ! command -v inotifywait >/dev/null 2>&1; then
|
|
echo "❌ inotifywait not found. Install with:"
|
|
echo "sudo apt install inotify-tools"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Watching: pkg/ internal/ cmd/ *.go"
|
|
echo "Press Ctrl+C to stop"
|
|
echo ""
|
|
|
|
# Run initial check
|
|
$CI_SCRIPT
|
|
|
|
echo ""
|
|
echo "👀 Watching for changes..."
|
|
|
|
# Watch for changes and re-run
|
|
while inotifywait -q -r -e modify,move,create,delete \
|
|
--include='.*\.go$' \
|
|
pkg/ internal/ cmd/ . 2>/dev/null; do
|
|
|
|
echo ""
|
|
echo "🔄 Files changed, running $MODE validation..."
|
|
echo ""
|
|
|
|
if $CI_SCRIPT; then
|
|
echo ""
|
|
echo "✅ Validation passed - watching for changes..."
|
|
else
|
|
echo ""
|
|
echo "❌ Validation failed - fix issues and save files to retry"
|
|
fi
|
|
done |