mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-02 22:50:18 +00:00
build: MacOS X is now macOS; don't presume to know all possible goarchs
This commit is contained in:
parent
35a75a95dc
commit
7b47692ec0
13
build.go
13
build.go
@ -239,8 +239,6 @@ func main() {
|
|||||||
// might have installed during "build.go setup".
|
// might have installed during "build.go setup".
|
||||||
os.Setenv("PATH", fmt.Sprintf("%s%cbin%c%s", os.Getenv("GOPATH"), os.PathSeparator, os.PathListSeparator, os.Getenv("PATH")))
|
os.Setenv("PATH", fmt.Sprintf("%s%cbin%c%s", os.Getenv("GOPATH"), os.PathSeparator, os.PathListSeparator, os.Getenv("PATH")))
|
||||||
|
|
||||||
checkArchitecture()
|
|
||||||
|
|
||||||
// Invoking build.go with no parameters at all builds everything (incrementally),
|
// Invoking build.go with no parameters at all builds everything (incrementally),
|
||||||
// which is what you want for maximum error checking during development.
|
// which is what you want for maximum error checking during development.
|
||||||
if flag.NArg() == 0 {
|
if flag.NArg() == 0 {
|
||||||
@ -262,15 +260,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkArchitecture() {
|
|
||||||
switch goarch {
|
|
||||||
case "386", "amd64", "arm", "arm64", "ppc64", "ppc64le", "mips", "mipsle":
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
log.Printf("Unknown goarch %q; proceed with caution!", goarch)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func runCommand(cmd string, target target) {
|
func runCommand(cmd string, target target) {
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "setup":
|
case "setup":
|
||||||
@ -981,7 +970,7 @@ func buildHost() string {
|
|||||||
func buildArch() string {
|
func buildArch() string {
|
||||||
os := goos
|
os := goos
|
||||||
if os == "darwin" {
|
if os == "darwin" {
|
||||||
os = "macosx"
|
os = "macos"
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s-%s", os, goarch)
|
return fmt.Sprintf("%s-%s", os, goarch)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user