mirror of
https://github.com/shadoll/just-commons.git
synced 2025-12-20 04:27:43 +00:00
Fix group attribute syntax: use correct [group('name')] format
- Change all [group: 'name'] to [group('name')] per Just documentation
- Ensures compatibility with Just 1.21.0 and resolves 'Unknown attribute group' error
- Affects all just-commons files: container, volumes, postgres, mysql, images, registry, core
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Universal container management operations
|
||||
|
||||
# Start service (or all services if no service specified)
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
start service="" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -27,7 +27,7 @@ start service="" compose-file="":
|
||||
fi
|
||||
|
||||
# Stop service (or all services if no service specified)
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
stop service="" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -53,7 +53,7 @@ stop service="" compose-file="":
|
||||
fi
|
||||
|
||||
# Restart service (or all services if no service specified)
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
restart service="" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -78,7 +78,7 @@ restart service="" compose-file="":
|
||||
fi
|
||||
|
||||
# Show service status (specific service or all)
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
status service="" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -102,7 +102,7 @@ status service="" compose-file="":
|
||||
fi
|
||||
|
||||
# View logs for specific service or all services
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
logs service="" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -126,7 +126,7 @@ logs service="" compose-file="":
|
||||
fi
|
||||
|
||||
# Open shell in specific container
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
shell service compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -145,7 +145,7 @@ shell service compose-file="":
|
||||
$compose_cmd $file_arg exec "$service" /bin/bash
|
||||
|
||||
# Execute command in specific service container
|
||||
[group: 'container']
|
||||
[group('container')]
|
||||
exec service cmd compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -40,7 +40,7 @@ _detect_compose:
|
||||
fi
|
||||
|
||||
# Environment detection and validation
|
||||
[group: 'environment']
|
||||
[group('environment')]
|
||||
env-check:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Universal image operations - works for any project
|
||||
|
||||
# Build any project's container image
|
||||
[group: 'images']
|
||||
[group('images')]
|
||||
image-build project *args="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -58,7 +58,7 @@ image-build project *args="":
|
||||
echo -e "${GREEN}✓ Local tags: $project:$tag, $project:latest${NC}"
|
||||
|
||||
# Push any project's image to registry
|
||||
[group: 'images']
|
||||
[group('images')]
|
||||
image-push project tag=DEFAULT_TAG:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -133,7 +133,7 @@ image-push project tag=DEFAULT_TAG:
|
||||
fi
|
||||
|
||||
# Pull any project's image from registry
|
||||
[group: 'images']
|
||||
[group('images')]
|
||||
image-pull project tag=DEFAULT_TAG:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -286,7 +286,7 @@ image-info project tag="latest":
|
||||
fi
|
||||
|
||||
# List all project images
|
||||
[group: 'images']
|
||||
[group('images')]
|
||||
images-list:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -246,7 +246,7 @@ mysql-shell service="mysql" compose-file="":
|
||||
fi
|
||||
|
||||
# Restore MySQL database from backup file
|
||||
[group: 'database']
|
||||
[group('database')]
|
||||
mysql-restore backup_file database service="mysql" compose-file="" backup_path="./backups":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Universal PostgreSQL database operations
|
||||
|
||||
# Execute PostgreSQL SQL query
|
||||
[group: 'database']
|
||||
[group('database')]
|
||||
postgres-sql query service="postgres" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -32,7 +32,7 @@ postgres-sql query service="postgres" compose-file="":
|
||||
fi
|
||||
|
||||
# Check PostgreSQL connection and status
|
||||
[group: 'database']
|
||||
[group('database')]
|
||||
postgres-check service="postgres" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -57,7 +57,7 @@ postgres-check service="postgres" compose-file="":
|
||||
fi
|
||||
|
||||
# List PostgreSQL databases
|
||||
[group: 'database']
|
||||
[group('database')]
|
||||
postgres-list-databases service="postgres" compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -189,7 +189,7 @@ postgres-shell service="postgres" compose-file="":
|
||||
fi
|
||||
|
||||
# Restore PostgreSQL database from backup file
|
||||
[group: 'database']
|
||||
[group('database')]
|
||||
postgres-restore backup_file service="postgres" compose-file="" backup_path="./backups":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Registry operations
|
||||
|
||||
# Login to container registry
|
||||
[group: 'registry']
|
||||
[group('registry')]
|
||||
registry-login:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -49,7 +49,7 @@ registry-login:
|
||||
fi
|
||||
|
||||
# Logout from container registry
|
||||
[group: 'registry']
|
||||
[group('registry')]
|
||||
registry-logout:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -69,7 +69,7 @@ registry-logout:
|
||||
|
||||
|
||||
# Check authentication and registry status
|
||||
[group: 'registry']
|
||||
[group('registry')]
|
||||
registry-check:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Universal volume management operations
|
||||
|
||||
# Clean all volumes used by compose file (DESTRUCTIVE!)
|
||||
[group: 'volumes']
|
||||
[group('volumes')]
|
||||
volumes-clean-all compose-file="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -39,7 +39,7 @@ volumes-clean-all compose-file="":
|
||||
echo -e "{{GREEN}}✓ All volumes removed{{NC}}"
|
||||
|
||||
# Remove specific volume by name (DESTRUCTIVE!)
|
||||
[group: 'volumes']
|
||||
[group('volumes')]
|
||||
volumes-remove volume_name:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -75,7 +75,7 @@ volumes-remove volume_name:
|
||||
echo -e "{{GREEN}}✓ Volume '$volume_name' removed{{NC}}"
|
||||
|
||||
# Remove volumes matching pattern (DESTRUCTIVE!)
|
||||
[group: 'volumes']
|
||||
[group('volumes')]
|
||||
volumes-remove-pattern pattern:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -120,7 +120,7 @@ volumes-remove-pattern pattern:
|
||||
echo -e "{{GREEN}}✓ Matching volumes removed{{NC}}"
|
||||
|
||||
# List all volumes or filter by pattern
|
||||
[group: 'volumes']
|
||||
[group('volumes')]
|
||||
volumes-list pattern="":
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user