#!/usr/bin/env bash

USERNAME="cyteen"
PASSWORD="mlpfinsonik"
# DISTRIBUTION="unstable"
# DISTRIBUTION="excalibur"
DISTRIBUTION="ceres"
COMPONENT="main"
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload"

echo "See: automate/020_gitea_dpr.sh for sources.list creation."
echo "deb [signed-by=\${KEYRING}] https://${USERNAME}:${PASSWORD}@https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian ${DISTRIBUTION} ${COMPONENT}"

# show available packages
curl -s --url https://cyteen:mlpfinsonik@git2.ring-zero.co.uk/api/v1/packages/cyteen/ | jq '.[] | select(.type == "debian") | {type, name, version, html_url, created_at}'
