Use runtime info to determine ARM version for upgrade (fixes #1051)

This commit is contained in:
Jakob Borg
2014-12-01 10:24:13 +01:00
parent 1219423091
commit 0fde4b3b2e
10 changed files with 103 additions and 34 deletions

View File

@@ -28,13 +28,12 @@ import (
"os"
"path"
"path/filepath"
"runtime"
"strings"
)
// Upgrade to the given release, saving the previous binary with a ".old" extension.
func upgradeTo(path string, rel Release, archExtra string) error {
expectedRelease := fmt.Sprintf("syncthing-%s-%s%s-%s.", runtime.GOOS, runtime.GOARCH, archExtra, rel.Tag)
func upgradeTo(path string, rel Release) error {
expectedRelease := releaseName(rel.Tag)
if debug {
l.Debugf("expected release asset %q", expectedRelease)
}