mirror of
https://github.com/shadoll/just-commons.git
synced 2025-12-20 03:26:43 +00:00
🚀 MAJOR: Full migration to Just modules with modern features
BREAKING CHANGES: - Complete restructure to Just module architecture (requires Just 1.31.0+) - Command syntax changed: 'just postgres-sql' → 'just postgres sql' - Import syntax changed: import → mod declarations NEW FEATURES: ✨ Module-based architecture with optional modules ✨ Built-in Just colors ({{RED}}, {{GREEN}}, etc.) replace custom variables ✨ Enhanced [confirm] attributes for all destructive operations ✨ Organized [group('name')] attributes for better UX ✨ Modern justfile with comprehensive help system ✨ Updated documentation with migration guide MODULES: 📦 postgres/ - PostgreSQL operations (sql, check, create-database, etc.) 📦 mysql/ - MySQL operations (sql, check, create-user, etc.) 📦 volumes/ - Volume management (clean-all, remove, list) 📦 container/ - Container operations (start, stop, logs, shell, exec) 📦 registry/ - Registry auth (login, logout, check) 📦 images/ - Image operations (build, push, pull, tag, clean) USAGE: just postgres sql "SELECT version();" just volumes clean-all just images build myapp This is Just Commons v2.0 - a complete modernization using all of Just's latest features.
This commit is contained in:
26
core.just
26
core.just
@@ -45,12 +45,6 @@ env-check:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo "================================================"
|
||||
echo " Container Environment Detection"
|
||||
@@ -60,23 +54,23 @@ env-check:
|
||||
# Check Docker
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
if docker info >/dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Docker Engine detected and running${NC}"
|
||||
echo -e "{{GREEN}}✓ Docker Engine detected and running{{NORMAL}}"
|
||||
docker_available=true
|
||||
else
|
||||
echo -e "${YELLOW}⚠ Docker is installed but daemon is not running${NC}"
|
||||
echo -e "{{YELLOW}}⚠ Docker is installed but daemon is not running{{NORMAL}}"
|
||||
docker_available=false
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}✗ Docker not found${NC}"
|
||||
echo -e "{{RED}}✗ Docker not found{{NORMAL}}"
|
||||
docker_available=false
|
||||
fi
|
||||
|
||||
# Check Podman
|
||||
if command -v podman >/dev/null 2>&1; then
|
||||
echo -e "${GREEN}✓ Podman detected${NC}"
|
||||
echo -e "{{GREEN}}✓ Podman detected{{NORMAL}}"
|
||||
podman_available=true
|
||||
else
|
||||
echo -e "${RED}✗ Podman not found${NC}"
|
||||
echo -e "{{RED}}✗ Podman not found{{NORMAL}}"
|
||||
podman_available=false
|
||||
fi
|
||||
|
||||
@@ -86,14 +80,14 @@ env-check:
|
||||
echo "================================================"
|
||||
|
||||
if [ "$docker_available" = true ] || [ "$podman_available" = true ]; then
|
||||
echo -e "${GREEN}🎉 Container runtime available!${NC}"
|
||||
echo -e "{{GREEN}}🎉 Container runtime available!{{NORMAL}}"
|
||||
echo ""
|
||||
echo "You can use these universal commands:"
|
||||
echo " just build <project> # Build any project image"
|
||||
echo " just start <service> # Start any service"
|
||||
echo " just registry-login # Login to registry"
|
||||
echo " just images build <project> # Build any project image"
|
||||
echo " just container start <service> # Start any service"
|
||||
echo " just registry login # Login to registry"
|
||||
else
|
||||
echo -e "${RED}❌ No container runtime available${NC}"
|
||||
echo -e "{{RED}}❌ No container runtime available{{NORMAL}}"
|
||||
echo ""
|
||||
echo "Please install Docker or Podman:"
|
||||
echo " • Docker: https://docs.docker.com/get-docker/"
|
||||
|
||||
Reference in New Issue
Block a user