Skip to content

fix(renovate): match ARG GO_VERSION in Dockerfile - #341

Merged
phisco merged 1 commit into
mainfrom
fix/renovate-dockerfile-go-version
Aug 6, 2026
Merged

fix(renovate): match ARG GO_VERSION in Dockerfile#341
phisco merged 1 commit into
mainfrom
fix/renovate-dockerfile-go-version

Conversation

@phisco

@phisco phisco commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description of your changes

The Dockerfile half of the Go custom manager added in #338 never produced a dependency. Renovate compiles matchStrings with the g flag only (regEx(matchString, 'g') in lib/modules/manager/custom/regex/strategies.ts), so the leading ^ anchored to the start of the file rather than the start of a line, and ARG GO_VERSION= sits a few lines down. Even on a match the lazy group had nothing following it, so it would have captured the empty string.

This drops the anchor and terminates on a newline, as the sibling GO_VERSION: pattern already does. Verified against this repo's Dockerfile with the g flag: the old pattern yields 0 matches, the new one captures 1.

Heads-up for reviewers: this makes the manager live, so Renovate will start proposing Go bumps for the Dockerfile ARG. Here the ARG is 1, so expect a PR proposing a concrete version — if keeping the floating major is deliberate, this repo wants an ignore rule rather than the matcher staying broken.

I have:

  • Read and followed Crossplane's contribution process.
  • Added or updated unit tests for my change. (renovate configuration only)

The Dockerfile half of the Go custom manager never produced a dependency.
Renovate compiles matchStrings with the 'g' flag only, so the leading '^'
anchored to the start of the file rather than the start of a line, and the
ARG sits a few lines down. Even on a match, the lazy group had nothing
following it and would have captured the empty string.

Drop the anchor and terminate on a newline, as the sibling GO_VERSION
pattern already does.

Signed-off-by: Philippe Scorsolini <5697904+phisco@users.noreply.github.com>
@phisco
phisco merged commit 55116ae into main Aug 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants