From a05bca6f01bcbf72af83ac4cc13d55ecfe901c4e Mon Sep 17 00:00:00 2001 From: Ali Zein Yousuf Date: Sun, 14 Jun 2026 00:28:11 -0500 Subject: [PATCH] fix(bump): fetch upstream go.mod via /api/v1 raw endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same login-redirect issue as the source archive: gitea.com/gitea/runner/raw/tag/v*/go.mod now 303s to /user/login, so curl -fsSL saves the login HTML, grep finds no 'go N.N' line, and pipefail aborts the bump. Switching to /api/v1/repos/gitea/runner/raw/go.mod?ref=v* — anonymous, returns the raw go.mod. --- scripts/bump-version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index e419aa7..b794975 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -11,7 +11,7 @@ set -euo pipefail PN="gitea-runner" UPSTREAM_RSS="https://gitea.com/gitea/runner/releases.rss" UPSTREAM_ARCHIVE="https://gitea.com/api/v1/repos/gitea/runner/archive" -UPSTREAM_GOMOD="https://gitea.com/gitea/runner/raw/tag" +UPSTREAM_GOMOD="https://gitea.com/api/v1/repos/gitea/runner/raw/go.mod" : "${BUMP_TOKEN:?BUMP_TOKEN is required}" : "${GITHUB_SERVER_URL:?GITHUB_SERVER_URL is required}" @@ -82,7 +82,7 @@ git checkout -b "$branch" git mv "${pkgdir}/${PN}-${current}.ebuild" "${pkgdir}/${PN}-${latest}.ebuild" # Track the upstream go.mod's required Go version in BDEPEND. -goreq=$(curl -fsSL "${UPSTREAM_GOMOD}/v${latest}/go.mod" \ +goreq=$(curl -fsSL "${UPSTREAM_GOMOD}?ref=v${latest}" \ | grep -oE '^go [0-9]+\.[0-9]+(\.[0-9]+)?' | awk '{print $2}') [ -n "$goreq" ] && sed -i -E \ "s#^BDEPEND=\">=dev-lang/go-[0-9.]+\"#BDEPEND=\">=dev-lang/go-${goreq}\"#" \