cli: overwrite chart versions during install/upgrade

* As charts receive information like the container image from
the cli it makes sense to also version the charts based on the cli
version.
* The pseudoversion is recalculated when running cmake.
* When merging changes from release branch to main,
a new commit is introduced to set the PROJECT_VERSION back
to 0.0.0, so that builds include a pseudoversion.
This commit is contained in:
Otto Bittner 2023-02-21 11:55:49 +01:00
parent 948a12461c
commit 08ee56911b
66 changed files with 131 additions and 97 deletions

View file

@ -149,8 +149,12 @@ func (c *Client) upgradeRelease(
case certManagerReleaseName:
values = loader.loadCertManagerValues()
case conOperatorsReleaseName:
// ensure that the operator chart has the same version as the CLI
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo))
values, err = loader.loadOperatorsValues()
case conServicesReleaseName:
// ensure that the services chart has the same version as the CLI
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo))
values, err = loader.loadConstellationServicesValues()
default:
return fmt.Errorf("invalid release name: %s", releaseName)