1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

main.go should be in build section

This commit is contained in:
Carlos Alexandro Becker 2016-12-29 12:37:11 -02:00
parent c6668ed741
commit b38c1843d8
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ func Build(version string, config config.ProjectConfig) error {
"build",
"-ldflags=-s -w -X main.version="+version,
"-o", target(bos, arch, config.BinaryName),
config.Main,
config.Build.Main,
)
cmd.Env = append(
cmd.Env,

View File

@ -18,11 +18,11 @@ type HomebrewDeploy struct {
type BuildConfig struct {
Oses []string
Arches []string
Main string
}
type ProjectConfig struct {
Repo string
Main string
BinaryName string `yaml:"binary_name"`
Files []string
Brew HomebrewDeploy
@ -53,8 +53,8 @@ func fix(config ProjectConfig) ProjectConfig {
"LICENSE.md",
}
}
if config.Main == "" {
config.Main = "main.go"
if config.Build.Main == "" {
config.Build.Main = "main.go"
}
if config.Token == "" {
config.Token = os.Getenv("GITHUB_TOKEN")