feature test

This commit is contained in:
paltovkone
2026-03-09 23:41:12 +04:00
parent c18d4adcb3
commit 32f5bc03b7

View File

@ -5,4 +5,32 @@ mkdir -p out
nfpm package --config /pkg/nfpm.yaml --packager deb --target /pkg/out/
echo "✓ built $(ls out/*.deb)"
ls -la out/
ls -la out/
DEB=$(ls /pkg/out/*.deb | head -1)
FILENAME=$(basename "$DEB")
DISTRIBUTION="bookworm"
COMPONENT="main"
echo "↑ publishing ${FILENAME}..."
HTTP_CODE=$(curl -fsSL \
-w "%{http_code}" \
-o /tmp/publish_response.txt \
-X PUT \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${DEB}" \
"${GITEA_URL}/api/packages/${GITEA_OWNER}/debian/pool/${DISTRIBUTION}/${COMPONENT}/upload")
cat /tmp/publish_response.txt
echo ""
if [[ "$HTTP_CODE" =~ ^2 ]]; then
echo "✓ published ${FILENAME} (HTTP ${HTTP_CODE})"
else
echo "✗ failed (HTTP ${HTTP_CODE})"
exit 1
fi