Browse Source

Call the darwin releases macosx instead

Jakob Borg 11 years ago
parent
commit
43e7435c41
2 changed files with 9 additions and 3 deletions
  1. 2 2
      build.sh
  2. 7 1
      upgrade/upgrade_supported.go

+ 2 - 2
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"

+ 7 - 1
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") {