fugma
All checks were successful
Generate README / build (push) Successful in 8s

This commit is contained in:
2025-12-02 23:22:41 -05:00
parent d82a96eccb
commit 5545ccaf1f

View File

@@ -5,27 +5,8 @@ set -euo pipefail
# This file is intended to be run in CI and locally. # This file is intended to be run in CI and locally.
determine_repo_web_base() { determine_repo_web_base() {
local origin_url # Use hardcoded base URL
origin_url="$(git config --get remote.origin.url || true)" printf '%s' "https://git.hudsonriggs.systems/HRiggs/Tools"
if [[ -z "${origin_url}" ]]; then
echo "Error: could not determine git remote origin URL" >&2
exit 1
fi
local web_base
if [[ "${origin_url}" =~ ^https?:// ]]; then
web_base="${origin_url%.git}"
elif [[ "${origin_url}" =~ ^git@([^:]+):(.+)\.git$ ]]; then
local host path
host="${BASH_REMATCH[1]}"
path="${BASH_REMATCH[2]}"
web_base="https://${host}/${path}"
else
# Fallback: strip trailing .git if present
web_base="${origin_url%.git}"
fi
printf '%s' "${web_base}"
} }
determine_branch() { determine_branch() {