mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-22 19:45:43 +00:00
Check if targeted version is supported by binary
Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
9b649f6c72
commit
5263dabd22
4 changed files with 73 additions and 1 deletions
|
|
@ -141,6 +141,10 @@ func generateInstallManifests(targetPath, namespace, tmpDir string, localManifes
|
|||
}
|
||||
}
|
||||
|
||||
if !utils.CompatibleVersion(VERSION, bootstrapArgs.version) {
|
||||
return "", fmt.Errorf("targeted version '%s' is not compatible with your current version of flux (%s)", bootstrapArgs.version, VERSION)
|
||||
}
|
||||
|
||||
opts := install.Options{
|
||||
BaseURL: localManifests,
|
||||
Version: bootstrapArgs.version,
|
||||
|
|
|
|||
|
|
@ -126,6 +126,10 @@ func installCmdRun(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
}
|
||||
|
||||
if !utils.CompatibleVersion(VERSION, installVersion) {
|
||||
return fmt.Errorf("targeted version '%s' is not compatible with your current version of flux (%s)", installVersion, VERSION)
|
||||
}
|
||||
|
||||
tmpDir, err := ioutil.TempDir("", rootArgs.namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue