This commit is contained in:
DealSage template sync
2026-09-25 17:56:38 +00:00
commit 36aeaf65c3
13 changed files with 804 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Make sure the runner has what the pipeline shells out to: curl and jq always,
# the AWS CLI only when bundles go to R2 through the S3 API (no
# CUSTOM_APPS_WORKER_URL). Installs are apt-based, matching the runner image.
set -euo pipefail
. "$(dirname "$0")/lib.sh"
need_apt=()
command -v curl >/dev/null || need_apt+=(curl)
command -v jq >/dev/null || need_apt+=(jq)
if [ "${#need_apt[@]}" -gt 0 ]; then
log "Installing ${need_apt[*]}"
apt-get update -qq && apt-get install -y -qq --no-install-recommends "${need_apt[@]}" >/dev/null
fi
if [ -z "${CUSTOM_APPS_WORKER_URL:-}" ] && ! command -v aws >/dev/null; then
log "Installing the AWS CLI (bundle upload goes to R2 over S3)"
command -v unzip >/dev/null || { apt-get update -qq && apt-get install -y -qq --no-install-recommends unzip >/dev/null; }
curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
unzip -q -o /tmp/awscliv2.zip -d /tmp
/tmp/aws/install >/dev/null
fi
echo "tools ready: curl $(curl --version | head -n1 | cut -d' ' -f2), jq $(jq --version)$( command -v aws >/dev/null && echo ", aws $(aws --version 2>&1 | cut -d' ' -f1)")"