From ee9cca3d8127b7d607e7423511a87451797cea1d Mon Sep 17 00:00:00 2001 From: Ali Zein Yousuf Date: Wed, 20 May 2026 20:59:08 -0500 Subject: [PATCH] fix(bump): preserve GITHUB_SERVER_URL scheme when cloning The Gitea runner's GITHUB_SERVER_URL is the internal http endpoint (http://172.17.0.1:3000); hard-coding https:// in the clone URL caused a TLS error. Derive the scheme from GITHUB_SERVER_URL, and use the public host for the PR-body vendor link. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/bump-version.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 2e78c55..0cc1f19 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -18,7 +18,10 @@ UPSTREAM_GOMOD="https://gitea.com/gitea/runner/raw/tag" : "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}" API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}" -host=${GITHUB_SERVER_URL#http://}; host=${host#https://} +# Preserve the scheme of GITHUB_SERVER_URL — on a Gitea runner this is the +# internal endpoint (e.g. http://172.17.0.1:3000), which speaks plain HTTP. +scheme="${GITHUB_SERVER_URL%%://*}" +host="${GITHUB_SERVER_URL#*://}" api() { curl -fsSL -H "Authorization: token ${BUMP_TOKEN}" "$@"; } # --- determine versions ------------------------------------------------------ @@ -28,7 +31,7 @@ latest=$(curl -fsSL "$UPSTREAM_RSS" \ [ -n "$latest" ] || { echo "could not parse upstream version"; exit 1; } WORK=$(mktemp -d) -git clone "https://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK" +git clone "${scheme}://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK" cd "$WORK" pkgdir="dev-util/${PN}" @@ -111,7 +114,7 @@ body=$(cat <