From 85122866ac9a6fce9ec006f7c3502eaabd623059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Schl=C3=B6ffel?= Date: Mon, 13 Jul 2026 03:06:06 +0200 Subject: [PATCH] fix publisher bug for multiarch packages --- packaging/alpine/local/gitea/APKBUILD | 2 +- packaging/alpine/local/seaweedfs/APKBUILD | 2 +- scripts/apk/publish-gitea.sh | 21 +++++---------------- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/packaging/alpine/local/gitea/APKBUILD b/packaging/alpine/local/gitea/APKBUILD index e2a254f..e59b9d2 100644 --- a/packaging/alpine/local/gitea/APKBUILD +++ b/packaging/alpine/local/gitea/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Joachim Schlöffel pkgname=gitea pkgver=1.26.4 -pkgrel=0 +pkgrel=1 pkgdesc="Self-hosted Git service written in Go" url="https://about.gitea.com/" arch="x86_64 aarch64" diff --git a/packaging/alpine/local/seaweedfs/APKBUILD b/packaging/alpine/local/seaweedfs/APKBUILD index a202da2..a89952b 100644 --- a/packaging/alpine/local/seaweedfs/APKBUILD +++ b/packaging/alpine/local/seaweedfs/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Joachim Schlöffel pkgname=seaweedfs pkgver=4.39 -pkgrel=0 +pkgrel=1 pkgdesc="Distributed storage system for object storage, file systems, and Iceberg tables" url="https://github.com/seaweedfs/seaweedfs" arch="x86_64 aarch64" diff --git a/scripts/apk/publish-gitea.sh b/scripts/apk/publish-gitea.sh index 7970568..4b5f042 100755 --- a/scripts/apk/publish-gitea.sh +++ b/scripts/apk/publish-gitea.sh @@ -64,39 +64,28 @@ while IFS= read -r package_dir; do done done < <(apk_all_package_dirs "${repo_root}") -declare -A published_filenames=() -unique_apks=() +current_apks=() stale_count=0 -duplicate_count=0 for apk in "${apks[@]}"; do - filename="$(basename "${apk}")" if [[ -z "${expected_apks[${apk}]:-}" ]]; then printf 'Skipping stale local APK: %s\n' "${apk#"${repo_root}/"}" stale_count=$((stale_count + 1)) continue fi - if [[ -n "${published_filenames[${filename}]:-}" ]]; then - duplicate_count=$((duplicate_count + 1)) - continue - fi - published_filenames["${filename}"]=1 - unique_apks+=("${apk}") + current_apks+=("${apk}") done -if [[ "${#unique_apks[@]}" -eq 0 ]]; then +if [[ "${#current_apks[@]}" -eq 0 ]]; then printf 'no current APK files found under %s\n' "${package_root}" >&2 exit 1 fi -printf 'Publishing %d APK files to %s\n' "${#unique_apks[@]}" "${upload_url}" -if [[ "${duplicate_count}" -ne 0 ]]; then - printf 'Skipping %d duplicate local APK filename(s)\n' "${duplicate_count}" -fi +printf 'Publishing %d APK files to %s\n' "${#current_apks[@]}" "${upload_url}" if [[ "${stale_count}" -ne 0 ]]; then printf 'Skipping %d stale local APK file(s)\n' "${stale_count}" fi -for apk in "${unique_apks[@]}"; do +for apk in "${current_apks[@]}"; do filename="$(basename "${apk}")" status="$( curl --silent --show-error --location \