mirror of
https://github.com/okxlin/release-factory.git
synced 2026-09-23 16:02:18 +00:00
Reject unsafe workstation credentials, fix native ARM64 Java, and remove duplicate extensions, caches and temporary tool layers. Pin OpenCode's baseline and Gemini's source/runtime inputs; refresh maintained browser and OS packages; fix Nginx and vendored ZIP vulnerabilities. Verify real login, default plugins, browser/CDP persistence and isolated OpenClaw sandbox operations. Build each platform once and bind release publication to the tested config and manifest digests. Keep service-specific vulnerability gates and refresh DSH APT stages during PR verification. Validation: all 13 PR verification jobs passed, including native amd64/arm64 workstations and DSH variants, plus both browser variants and OpenClaw on amd64. Publication jobs were skipped for PR verification.
43 lines
1.1 KiB
Bash
43 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${DCP_INSTALL:=1}"
|
|
: "${DCP_GLOBAL:=1}"
|
|
: "${OPENCODE_CONFIG_DIR:=$HOME/.config/opencode}"
|
|
: "${OPENCODE_BASELINE_DIR:=/opt/opencode}"
|
|
|
|
log() {
|
|
printf '[plugins] %s\n' "$*"
|
|
}
|
|
|
|
ensure_opencode() {
|
|
if ! command -v opencode >/dev/null 2>&1; then
|
|
log 'opencode is required before installing plugins'
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
ensure_config_dir() {
|
|
mkdir -p "$OPENCODE_CONFIG_DIR"
|
|
}
|
|
|
|
install_dcp() {
|
|
[[ "${DCP_INSTALL}" == "1" ]] || return 0
|
|
: "${DCP_PACKAGE:=$(node -p 'require(process.argv[1]).config.dcpPackage' "${OPENCODE_BASELINE_DIR}/package.json")}"
|
|
ensure_config_dir
|
|
log 'installing Dynamic Context Pruning plugin'
|
|
if [[ "${DCP_GLOBAL}" == "1" ]]; then
|
|
opencode plugin "${DCP_PACKAGE}" --global
|
|
else
|
|
opencode plugin "${DCP_PACKAGE}"
|
|
fi
|
|
python3 /app/scripts/update_opencode_config.py plugin "${DCP_PACKAGE}"
|
|
if [[ -n "${DCP_CONFIG_B64:-}" ]]; then
|
|
log 'writing DCP config from DCP_CONFIG_B64'
|
|
printf '%s' "$DCP_CONFIG_B64" | base64 -d > "$OPENCODE_CONFIG_DIR/dcp.jsonc"
|
|
fi
|
|
}
|
|
|
|
ensure_opencode
|
|
install_dcp
|