Add pipeline helper scripts
All checks were successful
Python tests (make) / test (push) Successful in 12s
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:
29
deploy/pull-package.sh
Executable file
29
deploy/pull-package.sh
Executable 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}"
|
||||
Reference in New Issue
Block a user