Fix original version mapping in versioner

This commit is contained in:
Ettore Di Giacinto
2020-04-04 16:23:43 +02:00
parent 5bf60deffc
commit 626419f955

View File

@@ -50,12 +50,11 @@ func (w *WrappedVersioner) Sort(toSort []string) []string {
result := []string{}
for _, v := range toSort {
sanitizedVersion := w.Sanitize(v)
versionsMap[v] = sanitizedVersion
versionsMap[sanitizedVersion] = v
versionsRaw = append(versionsRaw, sanitizedVersion)
}
versions := make([]*semver.Version, len(versionsRaw))
for i, raw := range versionsRaw {
v, _ := semver.NewVersion(raw)
versions[i] = v