mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-07-06 17:52:21 +02:00
fix(taskfile): detect Go version from go directive as fallback
Renovate now updates the `go` directive in `go.mod` directly and drops the redundant `toolchain` line, which broke the `GO_VERSION` lookup in the Taskfile and caused `task ci` to fail with an empty version. Read the `toolchain` line when present and fall back to the `go` directive otherwise. Update the Dockerfile comments to match. Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
parent
89d1e3be20
commit
2b2c25ffc1
@ -7,7 +7,7 @@ output: prefixed
|
||||
# Variables that are shared across tasks.
|
||||
vars:
|
||||
GO_VERSION:
|
||||
sh: sed -n 's/^toolchain go//p' go.mod
|
||||
sh: sed -n 's/^toolchain go//p' go.mod | grep . || sed -n 's/^go //p' go.mod
|
||||
# renovate: datasource=docker depName=kindest/node versioning=semver
|
||||
E2E_KUBERNETES_VERSION: v1.35.1
|
||||
E2E_CLUSTER_NAME: barman-cloud-plugin-e2e-{{.E2E_KUBERNETES_VERSION}}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Build the manager binary
|
||||
# GO_VERSION must be passed as a build arg (read from go.mod toolchain directive by Taskfile)
|
||||
# GO_VERSION must be passed as a build arg (read from go.mod by Taskfile)
|
||||
ARG GO_VERSION
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS gobuilder
|
||||
ARG TARGETOS
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# Both components are built before going into a distroless container
|
||||
|
||||
# Build the manager binary
|
||||
# GO_VERSION must be passed as a build arg (read from go.mod toolchain directive by Taskfile)
|
||||
# GO_VERSION must be passed as a build arg (read from go.mod by Taskfile)
|
||||
ARG GO_VERSION
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS gobuilder
|
||||
ARG TARGETOS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user