mirror of https://code.forgejo.org/forgejo/runner
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
parent
a6aae6b476
commit
74dc687c1d
|
@ -49,8 +49,8 @@ jobs:
|
||||||
set -ex
|
set -ex
|
||||||
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
|
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
|
||||||
version=$(go version | cut -d' ' -f3)
|
version=$(go version | cut -d' ' -f3)
|
||||||
if [ "$toolchain" != "$version" ]; then
|
if dpkg --compare-versions ${version#go} lt ${toolchain#go}; then
|
||||||
echo "go version mismatch: $toolchain <> $version"
|
echo "go version too low: $toolchain >= $version"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ EXECUTABLE := forgejo-runner
|
||||||
GOFMT ?= gofumpt -l
|
GOFMT ?= gofumpt -l
|
||||||
DIST := dist
|
DIST := dist
|
||||||
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
||||||
GO ?= go
|
GO ?= $(shell go env GOROOT)/bin/go
|
||||||
SHASUM ?= shasum -a 256
|
SHASUM ?= shasum -a 256
|
||||||
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
||||||
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
||||||
|
|
Loading…
Reference in New Issue