-
|
In my pipeline, I have a target like this to also update the version in my README file: targets:
readme:
name: 'deps: bump Talos version to {{ source "latestVersion" }}'
kind: file
scmid: default
sourceid: latestVersion
spec:
file: desk8s/README.adoc
matchpattern: 'f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d([\/:])v\d*\.\d*\.\d*'
replacepattern: 'f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d $1 {{ source "latestVersion" }}'The matched block for either a backslash or a colon works correctly, as I can see in the diff: But as you can see, there are additional spaces. Let's drop these in the replacepattern: 'f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d$1{{ source "latestVersion" }}'With this setup, the output is no longer correctly replaced: -- desk8s/README.adoc
+++ desk8s/README.adoc
@@ -17,13 +17,13 @@
Disk Image:
- https://factory.talos.dev/image/f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d/v1.13.3/metal-arm64.raw.xz
+ https://factory.talos.dev/image/f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d.13.4/metal-arm64.raw.xz
=== Upgrading Talos Linux
To upgrade Talos Linux on the machine, use the following command:
- talosctl upgrade -n 172.16.35.[5-9] --image factory.talos.dev/metal-installer/f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d:v1.13.3
+ talosctl upgrade -n 172.16.35.[5-9] --image factory.talos.dev/metal-installer/f8a903f101ce10f686476024898734bb6b36353cc4d41f348514db9004ec0a9d.13.4
The full upgrade command can be found in the https://docs.siderolabs.com/talos/v1.13/configure-your-talos-cluster/lifecycle-management/upgrading-talos#talosctl-upgrade[official Talos documentation].How can I use matched blocks from |
Beta Was this translation helpful? Give feedback.
Answered by
olblak
Jun 15, 2026
Replies: 1 comment 1 reply
-
|
Would something like this work? Note the Or something like |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ringods
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would something like this work?
Note the
[/:]instead of[\/:]Or something like