diff --git a/scripts/publish-release-assets.sh b/scripts/publish-release-assets.sh index 1650d0a9..90a609eb 100755 --- a/scripts/publish-release-assets.sh +++ b/scripts/publish-release-assets.sh @@ -39,18 +39,25 @@ if [ -x "$PROJECT_ROOT/core/target/release/archipelago" ]; then fi remote_url=$(git -C "$PROJECT_ROOT" remote get-url "$REMOTE") +# https is accepted as well as http. Requiring http:// meant the only remote +# whose credential actually works for git push (the https one) was rejected, +# while the http remote it forced you to use had a dead token — so publishing +# failed on auth after the manifest had already passed every check +# (v1.7.121-alpha, 2026-08-04). The scheme is carried through to the API URL +# rather than assumed. case "$remote_url" in - http://*@*) ;; - *) fail "$REMOTE must be an authenticated http:// Gitea remote URL for API uploads" ;; + http://*@*|https://*@*) ;; + *) fail "$REMOTE must be an authenticated http(s):// Gitea remote URL for API uploads" ;; esac -auth=${remote_url#http://} -auth=${auth%@*} -host_path=${remote_url#http://$auth@} +scheme=${remote_url%%://*} +rest=${remote_url#*://} +auth=${rest%%@*} +host_path=${rest#*@} host=${host_path%%/*} repo_path=${host_path#*/} repo_path=${repo_path%.git} -api="http://$host/api/v1/repos/$repo_path" +api="$scheme://$host/api/v1/repos/$repo_path" release_url="$api/releases/tags/v${VERSION}" echo "Pushing main and v${VERSION} to $REMOTE..."