Aggregate v0.10

This commit is contained in:
Jakob Borg 2015-06-15 10:49:48 +02:00
parent 525aac74aa
commit ca96b13233

View File

@ -28,6 +28,7 @@ var (
listenAddr = getEnvDefault("UR_LISTEN", "0.0.0.0:8443")
tpl *template.Template
compilerRe = regexp.MustCompile(`\(([A-Za-z0-9()., -]+) [\w-]+ \w+\) ([\w@-]+)`)
aggregateVersions = []string{"v0.7", "v0.8", "v0.9", "v0.10"}
)
var funcs = map[string]interface{}{
@ -444,14 +445,10 @@ func transformVersion(v string) string {
}
// Truncate old versions to just the generation part
if strings.HasPrefix(v, "v0.7") {
return "v0.7.x"
for _, agg := range aggregateVersions {
if strings.HasPrefix(v, agg) {
return agg + ".x"
}
if strings.HasPrefix(v, "v0.8") {
return "v0.8.x"
}
if strings.HasPrefix(v, "v0.9") {
return "v0.9.x"
}
return v