65 lines
No EOL
1.5 KiB
Makefile
65 lines
No EOL
1.5 KiB
Makefile
.PHONY: build run test clean deploy logs
|
|
|
|
# Default target
|
|
all: build
|
|
|
|
# Build the Rust application
|
|
build:
|
|
@echo "🦀 Building Rust Update Manager..."
|
|
cargo build --release
|
|
|
|
# Build Docker image
|
|
docker-build:
|
|
@echo "🐳 Building Docker image..."
|
|
docker build -t rust-update-manager:latest .
|
|
|
|
# Run locally for development
|
|
dev:
|
|
@echo "🔧 Running in development mode..."
|
|
RUST_LOG=debug cargo run
|
|
|
|
# Run tests
|
|
test:
|
|
@echo "🧪 Running tests..."
|
|
cargo test
|
|
|
|
# Deploy with Docker Compose
|
|
deploy:
|
|
@echo "🚀 Deploying with Docker Compose..."
|
|
chmod +x scripts/*.sh
|
|
./scripts/deploy.sh
|
|
|
|
# Run the demo
|
|
demo:
|
|
@echo "🎯 Running demo..."
|
|
chmod +x scripts/*.sh
|
|
./scripts/test-demo.sh
|
|
|
|
# View logs
|
|
logs:
|
|
docker-compose logs -f
|
|
|
|
# Clean up
|
|
clean:
|
|
@echo "🧹 Cleaning up..."
|
|
cargo clean
|
|
docker-compose down -v
|
|
docker rmi rust-update-manager:latest 2>/dev/null || true
|
|
|
|
generate-config:
|
|
@echo "🔧 Generating configuration..."
|
|
cp config.toml.example ./$1/config.toml
|
|
|
|
# Show help
|
|
help:
|
|
@echo "Silserv - Make targets:"
|
|
@echo " build - Build the Rust application"
|
|
@echo " docker-build- Build Docker image"
|
|
@echo " dev - Run in development mode"
|
|
@echo " generate-config - Generate configuration file"
|
|
@echo " test - Run tests"
|
|
@echo " deploy - Deploy with Docker Compose"
|
|
@echo " demo - Run complete demo"
|
|
@echo " logs - View container logs"
|
|
@echo " clean - Clean up everything"
|
|
@echo " help - Show this help"
|