Commit 1f7de408 authored by Andreas Düren's avatar Andreas Düren
Browse files

Fix Go version compatibility by explicitly using Go 1.22.2

parent cf7865b5
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -352,10 +352,10 @@ cd "$SERVER_DIR"
# Set Go module cache to a writable location
export GOPATH=/app/data/go
export GO111MODULE=on
# Use local Go version instead of trying to download
export GOTOOLCHAIN=local
# Override version requirements
export GOFLAGS="-mod=mod"
# Explicitly use Go 1.22.2
export GOTOOLCHAIN=go1.22.2
# 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
export GOCACHE=/app/data/go/cache
export GOMODCACHE=/app/data/go/modcache
@@ -433,9 +433,9 @@ 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"
    # Use local Go version
    export GOTOOLCHAIN=local
    export GOFLAGS="-mod=mod -modcacherw"
    # Explicitly use Go 1.22.2
    export GOTOOLCHAIN=go1.22.2
    
    # For Wasabi specific settings
    if [[ "${S3_ENDPOINT}" == *"wasabi"* ]]; then
@@ -513,8 +513,8 @@ else
        
        # Instead of trying to modify go.mod, set environment variables for compatibility
        echo "==> Setting Go environment variables for compatibility"
        export GOFLAGS="-mod=mod"
        export GOTOOLCHAIN=local
        export GOFLAGS="-mod=mod -modcacherw"
        export GOTOOLCHAIN=go1.22.2
        
        echo "==> Running main.go with Go"
        /usr/local/bin/gosu cloudron:cloudron go run -mod=mod main.go --port 8000 \