34-create-package-process (#35)
Some checks failed
Python tests (make) / test (push) Successful in 11s
Build & Push Package / package-and-push (push) Failing after 3s

works on #34

Reviewed-on: #35
Co-authored-by: Josh <josh@joshuaschuett.com>
Co-committed-by: Josh <josh@joshuaschuett.com>
This commit is contained in:
2025-08-26 20:02:48 +00:00
committed by Josh
parent 27d0f1b6e6
commit 5f3d54f3d7
5 changed files with 159 additions and 0 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}"