replace select version strings in files using regex
Closed this issue · 1 comments
hkiang01 commented
Problem
There are cases where you only want to replace a single string in a given file, but not all instances of the "current version" in said file. For example, consider the following appChart.yaml
, which is created from helm create app
(with comments removed):
apiVersion: v2
name: app
description: A Helm chart for Kubernetes
type: application
version: 1.16.0
appVersion: 1.16.0
It's possible that both version
and appVersion
match the version-upper config's current version, but you only want to replace appVersion
.
Potential Solution
bump2version has search
, but one should be careful such that the following doesn't occur:
appVersion: appVersion: 1.16.1
hkiang01 commented
Documentation isn't updated yet (see #15), but for now you can refer to test_search(), which uses chart.json to update this Chart.yaml to this Chart.yaml