mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Corrected version detection, so that equal versions match
This commit is contained in:
@@ -21,6 +21,7 @@ type Version struct {
|
||||
var frameworkCompatibleRangeList = [][]string{
|
||||
{"0.0.0", "0.20.0"}, // minimum Revel version to use with this version of the tool
|
||||
{"0.19.99", "0.30.0"}, // Compatible with Framework V 0.19.99 - 0.30.0
|
||||
{"1.0.0", "1.1.0"}, // Compatible with Framework V 1.0 - 1.1
|
||||
}
|
||||
|
||||
// Parses a version like v1.2.3a or 1.2
|
||||
@@ -70,6 +71,7 @@ func (v *Version) CompatibleFramework(c *CommandConfig) error {
|
||||
if !v.Newer(start) || v.Newer(end) {
|
||||
continue
|
||||
}
|
||||
|
||||
// Framework is older then 0.20, turn on historic mode
|
||||
if i == 0 {
|
||||
c.HistoricMode = true
|
||||
@@ -109,7 +111,7 @@ func (v *Version) Newer(o *Version) bool {
|
||||
if v.Maintenance != o.Maintenance {
|
||||
return v.Maintenance > o.Maintenance
|
||||
}
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
// Convert the version to a string
|
||||
|
||||
Reference in New Issue
Block a user