Handle Hugo version strings with patch level

Fixes #3025
This commit is contained in:
Bjørn Erik Pedersen
2017-03-01 15:03:28 +01:00
parent a0e3ff1645
commit 3669015f56
4 changed files with 85 additions and 10 deletions

View File

@@ -1001,15 +1001,7 @@ func (c *commandeer) isThemeVsHugoVersionMismatch() (mismatch bool, requiredMinV
config := tomlMeta.(map[string]interface{})
if minVersion, ok := config["min_version"]; ok {
switch minVersion.(type) {
case float32:
return helpers.HugoVersionNumber < minVersion.(float32), fmt.Sprint(minVersion)
case float64:
return helpers.HugoVersionNumber < minVersion.(float64), fmt.Sprint(minVersion)
default:
return
}
return helpers.CompareVersion(minVersion) > 0, fmt.Sprint(minVersion)
}
return

View File

@@ -314,7 +314,7 @@ description = ""
homepage = "http://siteforthistheme.com/"
tags = []
features = []
min_version = 0.19
min_version = "0.19"
[author]
name = ""