alpine-caddy: revert to manually setting up go and xcaddy

Alpine repos currently have an outdated version of Golang, latest version of caddy refuses to build with xcaddy
This commit is contained in:
cobaltgit
2025-09-15 17:56:32 +01:00
parent bd1dbc64b1
commit 2510dd7da0

View File

@@ -19,8 +19,13 @@ msg_ok "Installed Caddy"
read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt read -r -p "${TAB3}Would you like to install xCaddy Addon? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
msg_info "Setup xCaddy" msg_info "Setup xCaddy"
$STD apk add --no-cache xcaddy cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.tar.gz" -o "xcaddy_${RELEASE:1}_linux_amd64.tar.gz"
$STD tar xzf xcaddy_"${RELEASE:1}"_linux_amd64.tar.gz -C /usr/local/bin
rm -rf /opt/xcaddy*
$STD xcaddy build $STD xcaddy build
msg_ok "Setup xCaddy" msg_ok "Setup xCaddy"
fi fi