CityGame/ci/setup-toolchain.sh

18 lines
655 B
Bash
Executable file

#!/usr/bin/env bash
# Fallback si la propriété ciBuildImage pointe encore vers maven:3.9-eclipse-temurin-21
set -euo pipefail
if command -v pnpm >/dev/null 2>&1; then
exit 0
fi
echo ">>> Installing Node 20 + pnpm (use image citygame-ci for faster CI)..."
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends curl ca-certificates
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends nodejs
corepack enable
corepack prepare pnpm@10.33.2 --activate
apt-get purge -y curl
apt-get autoremove -y -qq
rm -rf /var/lib/apt/lists/*