Add pipeline helper scripts
All checks were successful
Python tests (make) / test (push) Successful in 12s

Created a python script to bundle the application and some bash
scripts to pull and push packages from the registry.
This commit is contained in:
2025-08-26 15:50:45 -04:00
parent 6de4f4844e
commit c72907e5b1
5 changed files with 129 additions and 21 deletions

29
deploy/pull-package.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
CONFIG_FILE="$(dirname "$0")/local.env"
if [ -f "$CONFIG_FILE" ]; then
source "$CONFIG_FILE"
fi
VERSION="${VERSION:-${1:-latest}}"
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
echo "Or set VERSION env var."
exit 1
fi
OUTDIR="${DOWNLOAD_DIR:-downloads}"
mkdir -p "$OUTDIR"
FILENAME="${VERSION}.chess.zip"
URL="${REGISTRY_URL}/api/packages/projects/generic/chess/${VERSION}/chess.zip"
echo "${URL}"
echo "[*] Pulling package $FILENAME (version: $VERSION) from registry..."
curl -f -u "${REGISTRY_USER}:${REGISTRY_TOKEN}" \
-o "${OUTDIR}/${FILENAME}" \
"$URL"
echo "[+] Downloaded to ${OUTDIR}/${FILENAME}"