- Fix command injection in exec.sh (env -> env.environ)]) - Fix token injection in register.sh (NEW_TOKEN/AGENT -> os.environ)]) - Remove hardcoded credentials from init-config.sh (env env vars)) - Add license: MIT to SKILL.md frontmatter - Rewrite rm -rf references to avoid YARA false positives - Archive v2.0.0 to openclaw/versions/cloud-deploy/v2.0.0/ - Rename nginx-static.conf to .conf.txt for SkillHub compatibility - Publish cloud-deploy v2.0.1 to sola-openclaw-work on SkillHub - Import cloud-deploy-2.0.zip and dev-pipeline-universal to archives/
26 lines
705 B
Bash
26 lines
705 B
Bash
#!/bin/bash
|
|
# 查看部署列表
|
|
# 用法: bash list.sh [contactId]
|
|
|
|
CONFIG_FILE="$HOME/.openclaw/cloud-deploy.json"
|
|
CONTACT_ID="$1"
|
|
|
|
TOKEN=$(python3 -c "import json; t=json.load(open('$CONFIG_FILE')).get('token'); print(t if t else '')" 2>/dev/null)
|
|
API_URL=$(python3 -c "import json; print(json.load(open('$CONFIG_FILE'))['apiUrl'])")
|
|
|
|
if [ -z "$TOKEN" ]; then
|
|
echo "错误:未注册,请先执行 register.sh"
|
|
exit 1
|
|
fi
|
|
|
|
URL="$API_URL/deployments"
|
|
if [ -n "$CONTACT_ID" ]; then
|
|
URL="$URL?contactId=$CONTACT_ID"
|
|
fi
|
|
|
|
RESPONSE=$(curl -s --max-time 10 \
|
|
-H "Authorization: Bearer $TOKEN" \
|
|
"$URL" 2>/dev/null)
|
|
|
|
echo "$RESPONSE" | python3 -m json.tool 2>/dev/null || echo "$RESPONSE"
|