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>
62 lines
1.6 KiB
Bash
Executable File
62 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Development environment setup script
|
|
|
|
echo "Setting up development environment..."
|
|
|
|
# Create directories if they don't exist
|
|
mkdir -p logs
|
|
mkdir -p reports
|
|
mkdir -p reports/coverage
|
|
mkdir -p reports/test-results
|
|
mkdir -p reports/augments
|
|
mkdir -p storage
|
|
mkdir -p storage/keystore
|
|
mkdir -p storage/cache
|
|
mkdir -p .gocache
|
|
|
|
# Check if Go is installed
|
|
if ! command -v go &> /dev/null; then
|
|
echo "Error: Go is not installed" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Check if required tools are installed
|
|
echo "Checking for required tools..."
|
|
|
|
# Install golangci-lint if not present
|
|
if ! command -v golangci-lint &> /dev/null; then
|
|
echo "Installing golangci-lint..."
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
fi
|
|
|
|
# Install gosec if not present
|
|
if ! command -v gosec &> /dev/null; then
|
|
echo "Installing gosec..."
|
|
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
fi
|
|
|
|
# Install govulncheck if not present
|
|
if ! command -v govulncheck &> /dev/null; then
|
|
echo "Installing govulncheck..."
|
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
fi
|
|
|
|
# Install delve if not present
|
|
if ! command -v dlv &> /dev/null; then
|
|
echo "Installing delve..."
|
|
go install github.com/go-delve/delve/cmd/dlv@latest
|
|
fi
|
|
|
|
# Copy example config if not exists
|
|
if [ ! -f config/development.yaml ]; then
|
|
echo "Creating development config..."
|
|
cp config/development.yaml.example config/development.yaml 2>/dev/null || echo "Config example not found, creating basic config..."
|
|
fi
|
|
|
|
# Verify Go modules
|
|
echo "Verifying Go modules..."
|
|
go mod tidy
|
|
|
|
echo "Development environment setup complete!" |