From 43e7435c41a625174ad0e5618b991ee8db4b5a5c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 1 Aug 2014 16:30:28 +0200 Subject: [PATCH] Call the darwin releases macosx instead --- build.sh | 4 ++-- upgrade/upgrade_supported.go | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index d82e594fc..35c3449f9 100755 --- a/build.sh +++ b/build.sh @@ -147,7 +147,7 @@ case "$1" in build eval $(go env) - name="syncthing-$GOOS-$GOARCH-$version" + name="syncthing-${GOOS/darwin/macosx}-$GOARCH-$version" tarDist "$name" ;; @@ -163,7 +163,7 @@ case "$1" in build - name="syncthing-$os-$version" + name="syncthing-${os/darwin/macosx}-$version" case $GOOS in windows) zipDist "$name" diff --git a/upgrade/upgrade_supported.go b/upgrade/upgrade_supported.go index bc4bdaae9..c25d0f676 100644 --- a/upgrade/upgrade_supported.go +++ b/upgrade/upgrade_supported.go @@ -32,7 +32,13 @@ func UpgradeTo(rel Release) error { return err } - expectedRelease := fmt.Sprintf("syncthing-%s-%s%s-%s.", runtime.GOOS, runtime.GOARCH, GoArchExtra, rel.Tag) + osName := runtime.GOOS + if osName == "darwin" { + // We call the darwin release bundles macosx because that makes more + // sense for people downloading them + osName = "macosx" + } + expectedRelease := fmt.Sprintf("syncthing-%s-%s%s-%s.", osName, runtime.GOARCH, GoArchExtra, rel.Tag) for _, asset := range rel.Assets { if strings.HasPrefix(asset.Name, expectedRelease) { if strings.HasSuffix(asset.Name, ".tar.gz") {