Rename WIP to original script name.

This commit is contained in:
cyteen 2024-05-19 10:44:31 +01:00
parent 74e6942caf
commit 012315ee5d
2 changed files with 2 additions and 33 deletions

View File

@ -4,6 +4,7 @@ USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
ARCH=$(dpkg --print-architecture)
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload"
# Check if a .deb file was provided as an argument
@ -21,7 +22,7 @@ curl \
${GITEA_URL}
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}"
echo "deb [arch=\${ARCH} 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}'

View File

@ -1,32 +0,0 @@
#!/usr/bin/env bash
set -x
USERNAME="cyteen"
PASSWORD="mlpfinsonik"
DISTRIBUTION="ceres"
COMPONENT="main"
# Extract the architecture from the filename
DEB_FILE="$1"
ARCHITECTURE="${DEB_FILE%.*}" # Remove the.deb extension to get the architecture
# Validate the architecture
if [[ $ARCHITECTURE =~ ^(amd64|arm64)$ ]]; then
echo "Invalid architecture. Must be either amd64 or arm64."
exit 1
fi
# Construct the GITEA URL based on the architecture
GITEA_URL="https://git2.ring-zero.co.uk/api/packages/${USERNAME}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload/${ARCHITECTURE}"
# Upload the specified.deb file
curl \
--user ${USERNAME}:${PASSWORD} \
--upload-file "${DEB_FILE}" \
${GITEA_URL}
# 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}'