Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dev version of lima #864

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/sirupsen/logrus"
"strings"

"github.com/abiosoft/colima/cli"
Expand Down Expand Up @@ -120,8 +121,14 @@ func LimaVersionSupported() error {
return fmt.Errorf("error decoding 'limactl info' json: %w", err)
}
// remove pre-release hyphen
if str := strings.SplitN(values.Version, "-", 2); len(str) > 0 {
values.Version = str[0]
parts := strings.SplitN(values.Version, "-", 2)
if len(parts) > 0 {
values.Version = parts[0]
}

if parts[0] == "HEAD" {
logrus.Warnf("to avoid compatibility issues, ensure lima development version (%s) in use is not lower than %s", values.Version, limaVersion)
return nil
}

min := semver.New(strings.TrimPrefix(limaVersion, "v"))
Expand Down
Loading