Restore to commit 74e578279624c6045ca440a3459ebfa1f8d54191
This commit is contained in:
19
scripts/check-opencode.sh
Executable file
19
scripts/check-opencode.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Simple shell script to validate opencode and pwsh inside running container or local environment
|
||||
CONTAINER_NAME=${1:-wordpress-plugin-ai-builder}
|
||||
|
||||
if command -v docker > /dev/null 2>&1; then
|
||||
echo "Running checks inside container: $CONTAINER_NAME"
|
||||
docker compose exec $CONTAINER_NAME pwsh -NoProfile -Command "pwsh --version; node --version; opencode --version; . /root/.config/powershell/Microsoft.PowerShell_profile.ps1; Get-Command github"
|
||||
else
|
||||
echo "Docker not found - running local checks"
|
||||
pwsh --version
|
||||
node --version
|
||||
if command -v opencode > /dev/null 2>&1; then
|
||||
opencode --version
|
||||
else
|
||||
echo "opencode not found"; exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Checks completed."
|
||||
Reference in New Issue
Block a user