chore(ci): no complaints if the Go version is higher than required (#490)

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/490
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
pull/489/head
Earl Warren 2025-02-25 09:47:45 +00:00 committed by Michael Kriese
parent a6aae6b476
commit 74dc687c1d
No known key found for this signature in database
GPG Key ID: F128CBE6AB3A7201
2 changed files with 3 additions and 3 deletions

View File

@ -49,8 +49,8 @@ jobs:
set -ex
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
version=$(go version | cut -d' ' -f3)
if [ "$toolchain" != "$version" ]; then
echo "go version mismatch: $toolchain <> $version"
if dpkg --compare-versions ${version#go} lt ${toolchain#go}; then
echo "go version too low: $toolchain >= $version"
exit 1
fi

View File

@ -3,7 +3,7 @@ EXECUTABLE := forgejo-runner
GOFMT ?= gofumpt -l
DIST := dist
DIST_DIRS := $(DIST)/binaries $(DIST)/release
GO ?= go
GO ?= $(shell go env GOROOT)/bin/go
SHASUM ?= shasum -a 256
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest