build: Remove unused code
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3079
This commit is contained in:
committed by
Jakob Borg
parent
21e116aa45
commit
d628b731d1
17
build.go
17
build.go
@@ -674,13 +674,6 @@ func buildHost() string {
|
|||||||
return h
|
return h
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildEnvironment() string {
|
|
||||||
if v := os.Getenv("ENVIRONMENT"); len(v) > 0 {
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
return "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
func buildArch() string {
|
func buildArch() string {
|
||||||
os := goos
|
os := goos
|
||||||
if os == "darwin" {
|
if os == "darwin" {
|
||||||
@@ -693,16 +686,6 @@ func archiveName(target target) string {
|
|||||||
return fmt.Sprintf("%s-%s-%s", target.name, buildArch(), version)
|
return fmt.Sprintf("%s-%s-%s", target.name, buildArch(), version)
|
||||||
}
|
}
|
||||||
|
|
||||||
func run(cmd string, args ...string) []byte {
|
|
||||||
bs, err := runError(cmd, args...)
|
|
||||||
if err != nil {
|
|
||||||
log.Println(cmd, strings.Join(args, " "))
|
|
||||||
log.Println(string(bs))
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
return bytes.TrimSpace(bs)
|
|
||||||
}
|
|
||||||
|
|
||||||
func runError(cmd string, args ...string) ([]byte, error) {
|
func runError(cmd string, args ...string) ([]byte, error) {
|
||||||
ecmd := exec.Command(cmd, args...)
|
ecmd := exec.Command(cmd, args...)
|
||||||
bs, err := ecmd.CombinedOutput()
|
bs, err := ecmd.CombinedOutput()
|
||||||
|
|||||||
Reference in New Issue
Block a user