mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-02 08:38:47 +00:00
art: Write only version to VERSION in os-release
Add FLAVOR and VARIANT to handle those separately, this should also fix upgrades. Fixes https://github.com/c3os-io/c3os/issues/80
This commit is contained in:
parent
4bd6a5a8d5
commit
db2bcc0451
@ -2,7 +2,6 @@ package agent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -27,16 +26,11 @@ func Upgrade(version, image string, force bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
flavor := utils.Flavor()
|
||||
if flavor == "" {
|
||||
return errors.New("no flavor detected")
|
||||
}
|
||||
|
||||
registry, err := utils.OSRelease("IMAGE_REPO")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
img := fmt.Sprintf("%s:%s-%s", registry, flavor, version)
|
||||
img := fmt.Sprintf("%s:%s", registry, version)
|
||||
if image != "" {
|
||||
img = image
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user