MCPcopy
hub / github.com/syncthing/syncthing / install

Function install

build.go:453–480  ·  view source on GitHub ↗
(target target, tags []string)

Source from the content-addressed store, hash-verified

451}
452
453func install(target target, tags []string) {
454 lazyRebuildAssets()
455
456 tags = append(target.tags, tags...)
457
458 cwd, err := os.Getwd()
459 if err != nil {
460 log.Fatal(err)
461 }
462 os.Setenv("GOBIN", filepath.Join(cwd, "bin"))
463
464 setBuildEnvVars()
465
466 // On Windows generate a special file which the Go compiler will
467 // automatically use when generating Windows binaries to set things like
468 // the file icon, version, etc.
469 if goos == "windows" {
470 sysoPath, err := shouldBuildSyso(cwd)
471 if err != nil {
472 log.Printf("Warning: Windows binaries will not have file information encoded: %v", err)
473 }
474 defer shouldCleanupSyso(sysoPath)
475 }
476
477 args := []string{"install"}
478 args = appendParameters(args, tags, target.buildPkgs...)
479 runPrint(goCmd, args...)
480}
481
482func build(target target, tags []string) {
483 lazyRebuildAssets()

Callers 1

runCommandFunction · 0.85

Calls 7

lazyRebuildAssetsFunction · 0.85
setBuildEnvVarsFunction · 0.85
shouldBuildSysoFunction · 0.85
shouldCleanupSysoFunction · 0.85
appendParametersFunction · 0.85
runPrintFunction · 0.85
FatalMethod · 0.80

Tested by

no test coverage detected