Fix Go version compatibility by using auto toolchain

This commit is contained in:
Andreas Düren 2025-03-14 23:08:40 +01:00
parent 1f7de4085d
commit 6050c4564a

@ -352,8 +352,8 @@ cd "$SERVER_DIR"
# Set Go module cache to a writable location
export GOPATH=/app/data/go
export GO111MODULE=on
# Explicitly use Go 1.22.2
export GOTOOLCHAIN=go1.22.2
# Use auto toolchain to allow downloading required version
export GOTOOLCHAIN=auto
# Override version requirements and force module mode
export GOFLAGS="-mod=mod -modcacherw"
# Create a temporary directory for Go module cache and build in writable area
@ -434,8 +434,8 @@ elif [ -d "$SERVER_DIR/cmd/museum" ]; then
# Instead of modifying go.mod, set environment variables for compatibility
echo "==> Setting Go environment variables for compatibility"
export GOFLAGS="-mod=mod -modcacherw"
# Explicitly use Go 1.22.2
export GOTOOLCHAIN=go1.22.2
# Use auto toolchain to allow downloading required version
export GOTOOLCHAIN=auto
# For Wasabi specific settings
if [[ "${S3_ENDPOINT}" == *"wasabi"* ]]; then