Rename WIP to original script name.
This commit is contained in:
parent
74e6942caf
commit
012315ee5d
|
|
@ -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}'
|
||||
|
|
|
|||
|
|
@ -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}'
|
||||
Loading…
Reference in New Issue