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