Skip to content

Commit fccd110

Browse files
committed
fix: use file kind with content blocks for devcontainer updates
Use content parameter to identify the specific feature block, then apply version pattern matching within that block. This avoids JSONPath/yamlpath syntax issues with keys containing special characters.
1 parent 31c81e8 commit fccd110

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

updatecli/updatecli.d/devcontainer.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,32 @@ targets:
4040
dockerVersion:
4141
name: 'deps(devcontainer): update Docker version'
4242
scmid: default
43-
kind: yaml
43+
kind: file
4444
sourceid: dockerLatestMinor
4545
spec:
4646
file: .devcontainer/devcontainer.json
47-
key: '.features["ghcr.io/devcontainers/features/docker-in-docker:2"].version'
47+
matchpattern: '("version": ")(v?[0-9.]+)(")'
48+
replacepattern: '${1}v{{ source "dockerLatestMinor" }}${3}'
49+
content: |
50+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
51+
"version": "{{ source "dockerLatestMinor" }}",
4852
transformers:
4953
- trimprefix: v
50-
- addprefix: v
5154

5255
githubcliVersion:
5356
name: 'deps(devcontainer): update GitHub CLI version'
5457
scmid: default
55-
kind: yaml
58+
kind: file
5659
sourceid: githubcliLatestMinor
5760
spec:
5861
file: .devcontainer/devcontainer.json
59-
key: '.features["ghcr.io/devcontainers/features/github-cli:1"].version'
62+
matchpattern: '("version": ")(v?[0-9.]+)(")'
63+
replacepattern: '${1}v{{ source "githubcliLatestMinor" }}${3}'
64+
content: |
65+
"ghcr.io/devcontainers/features/github-cli:1": {
66+
"version": "{{ source "githubcliLatestMinor" }}"
6067
transformers:
6168
- trimprefix: v
62-
- addprefix: v
6369

6470
actions:
6571
default:

0 commit comments

Comments
 (0)