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:
parent
c6668ed741
commit
b38c1843d8
@ -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,
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user