Adding variant parameter to the regexp post hook. This allows us to configure the version format that is used to replace the pre-existing version.
Current Problem
I am deploying a pre-release build and I have a helm/values.yaml file and I want the value of container.image.tag to be updated to the current docker image version. The current implementation will update the field with a value similar to 0.1.0-pr.0+1 but the + formatted version does not match the supported docker format 0.1.0-pr.0-1.
Solution
Extend current support for version formats (aka variant) to be used by regexp hooks. Add version_default: version to the version.ts variants function, and also add new variantByKey function. that can then be used in the regexp.ts
regexp hook can now be configured using version_dotnet, version_docker, or version_default (the default).
Adding
variant
parameter to theregexp
post hook. This allows us to configure the version format that is used to replace the pre-existing version.Current Problem
I am deploying a
pre-release build
and I have ahelm/values.yaml
file and I want the value ofcontainer.image.tag
to be updated to the current docker image version. The current implementation will update the field with a value similar to0.1.0-pr.0+1
but the+
formatted version does not match the supported docker format0.1.0-pr.0-1
.Solution
Extend current support for version formats (aka
variant
) to be used byregexp
hooks. Addversion_default: version
to the version.tsvariants
function, and also add new variantByKey function. that can then be used in the regexp.tsregexp
hook can now be configured usingversion_dotnet
,version_docker
, orversion_default
(the default).Example
version.yaml
config using variant