I'm updating the version of a Helm chart in the file Chart.yaml, and need to match ^version: .*$ - this gives zero matches. If I use version: .* it updates both version: lines, including the indented one.
Given this configuration:
- - semantic-release-replace-plugin
- replacements:
- files:
- Chart.yaml
from: "^version: .*"
to: "version: ${nextRelease.version}"
results:
- file: Chart.yaml
hasChanged: true
numMatches: 1
numReplacements: 1
I would expect this file:
# ...
version: 1.0.0
# ...
dependencies:
- alias: dovecot
version: "*"
To have only the first version: line updated.
Result: Nothing is replaced - ^ seems to break the RegEx matching.
Perhaps matching is done on the file as a whole, and not line-by-line?
I'm updating the version of a Helm chart in the file Chart.yaml, and need to match
^version: .*$- this gives zero matches. If I useversion: .*it updates bothversion:lines, including the indented one.Given this configuration:
I would expect this file:
To have only the first
version:line updated.Result: Nothing is replaced -
^seems to break the RegEx matching.Perhaps matching is done on the file as a whole, and not line-by-line?