Fix renovate support for xgo (#4276)

This commit is contained in:
Patrick Schratz 2024-10-30 14:21:50 +01:00 committed by GitHub
parent c7d7e5a214
commit 3adcfb8b14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 18 deletions

View file

@ -252,6 +252,7 @@
"pnpm-lock.yaml", "pnpm-lock.yaml",
"**/node_modules/**/*", "**/node_modules/**/*",
"cmd/server/docs/docs.go", "cmd/server/docs/docs.go",
"renovate.json",
// TODO: remove the following // TODO: remove the following
"docs/**/*.js", "docs/**/*.js",
"docs/**/*.ts" "docs/**/*.ts"

View file

@ -2,12 +2,13 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>woodpecker-ci/renovate-config"], "extends": ["github>woodpecker-ci/renovate-config"],
"automergeType": "pr", "automergeType": "pr",
"enabledManagers": ["woodpecker"],
"customManagers": [ "customManagers": [
{ {
"customType": "regex", "customType": "regex",
"fileMatch": ["shared/constant/constant.go"], "fileMatch": ["shared/constant/constant.go"],
"matchStrings": [ "matchStrings": [
"//\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+DefaultCloneImage = \"docker.io/woodpeckerci/plugin-git:(?<currentValue>.*)\"" "//\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s+DefaultClonePlugin = \"docker.io/woodpeckerci/plugin-git:(?<currentValue>.*)\""
], ],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
} }
@ -61,9 +62,10 @@
"matchFileNames": ["docs/**/package.json"] "matchFileNames": ["docs/**/package.json"]
}, },
{ {
"description": "Extract version from xgo container tags",
"matchDatasources": ["docker"], "matchDatasources": ["docker"],
"matchPackagePatterns": ["xgo"], "matchPackagePatterns": ["techknowlogick/xgo"],
"versioning": "regex:^go-(?<major>\\d+)?(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))$" "versioning": "regex:^go-(?<major>\\d+)\\.(?<minor>\\d+)\\.x$"
} }
] ]
} }

View file

@ -39,7 +39,8 @@ CGO_ENABLED ?= 1 # only used to compile server
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" )
ifeq ($(HAS_GO),GO) ifeq ($(HAS_GO),GO)
XGO_VERSION ?= go-1.20.x # renovate: datasource=docker depName=docker.io/techknowlogick/xgo
XGO_VERSION ?= go-1.22.x
CGO_CFLAGS ?= $(shell go env CGO_CFLAGS) CGO_CFLAGS ?= $(shell go env CGO_CFLAGS)
endif endif
CGO_CFLAGS ?= CGO_CFLAGS ?=

View file

@ -1,19 +1,8 @@
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local . # docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
FROM docker.io/golang:1.23-alpine3.19 as golang_image FROM docker.io/golang:1.23-alpine as golang_image
FROM docker.io/node:23-alpine3.19 FROM docker.io/node:23-alpine
# renovate: datasource=repology depName=alpine_3_19/make versioning=loose RUN apk add --no-cache --update make gcc binutils-gold musl-dev protoc && \
ENV MAKE_VERSION="4.4.1-r2"
# renovate: datasource=repology depName=alpine_3_19/gcc versioning=loose
ENV GCC_VERSION="13.2.1_git20231014-r0"
# renovate: datasource=repology depName=alpine_3_19/binutils-gold versioning=loose
ENV BINUTILS_GOLD_VERSION="2.41-r0"
# renovate: datasource=repology depName=alpine_3_19/musl-dev versioning=loose
ENV MUSL_DEV_VERSION="1.2.4_git20230717-r4"
# renovate: datasource=repology depName=alpine_3_19/protoc versioning=loose
ENV PROTOC_VERSION="24.4-r0"
RUN apk add --no-cache --update make=${MAKE_VERSION} gcc=${GCC_VERSION} binutils-gold=${BINUTILS_GOLD_VERSION} musl-dev=${MUSL_DEV_VERSION} protoc=${PROTOC_VERSION} && \
corepack enable corepack enable
# Build packages. # Build packages.