update: the package is published for Ubuntu 26.04 (resolute) as well as 24.04 (noble).
Release / release (push) Successful in 33s

This commit is contained in:
slawek committed 2026-10-29 21:42:15 +01:00
1 parent d99e4ea425
commit 3e78d520ae
3 files changed
+29 -11

No files matched your search

+3 -1
View File
@@ -1919,4 +1919,6 @@ cd debian-package
```
The build runs in a container and writes the package to `debian-package/out/`.
`./publish.sh` uploads it to the configured repository.
`./publish.sh` uploads it to the component `main` of the distributions `noble` and `resolute` of
the configured repository, skipping a distribution that has the version already;
`DISTRIBUTIONS` names others.
+11
View File
@@ -1,3 +1,14 @@
vpn-router (0.35.2-2) unstable; urgency=medium
update: the package is published for Ubuntu 26.04 (resolute) as well as 24.04 (noble).
* publish.sh uploads the package to the distributions noble and resolute
of the repository, component main, skipping a distribution that has
the version already; DISTRIBUTIONS names others. A router on Ubuntu
26.04 installs vpn-router from the distribution resolute.
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Thu, 29 Oct 2026 21:41:32 +0100
vpn-router (0.35.2-1) unstable; urgency=medium
fix: the web service answers /, /status and /status/full again while IKEv2 runs.
+15 -10
View File
@@ -11,6 +11,8 @@ esac
OWNER="${OWNER:-slawek}"
SERVER_URL="${SERVER_URL:-https://gitea.koszewscy.waw.pl}"
PACKAGES_TOKEN="${PACKAGES_TOKEN:-$(cat ~/.gitea-packages-token)}"
# The Ubuntu releases whose distribution of the repository gets the package, in its component main.
DISTRIBUTIONS="${DISTRIBUTIONS:-noble resolute}"
# Reads the changelog copied into the builder image, so no bind mount is needed.
changelog_field() {
@@ -27,14 +29,17 @@ if [ ! -f "$DEB" ]; then
exit 1
fi
STATUS="$(curl -s -o /dev/null -w '%{http_code}' --user "$OWNER:$PACKAGES_TOKEN" \
"$SERVER_URL/api/v1/packages/$OWNER/debian/$PACKAGE/$VERSION")"
case "$STATUS" in
200) printf '%s %s is already published, skipping.\n' "$PACKAGE" "$VERSION"; exit 0 ;;
404) ;;
*) printf 'ERROR: version check returned HTTP %s.\n' "$STATUS" >&2; exit 1 ;;
esac
BODY="$(mktemp)"
trap 'rm -f "$BODY"' EXIT
curl --fail-with-body --user "$OWNER:$PACKAGES_TOKEN" \
--upload-file "$DEB" \
"$SERVER_URL/api/packages/$OWNER/debian/pool/noble/main/upload"
# Gitea answers 409 for a version that is in the distribution already.
for DISTRIBUTION in $DISTRIBUTIONS; do
STATUS="$(curl -s -o "$BODY" -w '%{http_code}' --user "$OWNER:$PACKAGES_TOKEN" \
--upload-file "$DEB" \
"$SERVER_URL/api/packages/$OWNER/debian/pool/$DISTRIBUTION/main/upload")"
case "$STATUS" in
2??) printf '%s %s is published in %s/main.\n' "$PACKAGE" "$VERSION" "$DISTRIBUTION" ;;
409) printf '%s %s is already in %s/main, skipping.\n' "$PACKAGE" "$VERSION" "$DISTRIBUTION" ;;
*) printf 'ERROR: the upload to %s/main returned HTTP %s: %s\n' "$DISTRIBUTION" "$STATUS" "$(cat "$BODY")" >&2; exit 1 ;;
esac
done