(target target, tags []string)
| 451 | } |
| 452 | |
| 453 | func 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 | |
| 482 | func build(target target, tags []string) { |
| 483 | lazyRebuildAssets() |
no test coverage detected