mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-11 14:39:28 +02:00
fix: clarifying build --single-target
Make it more clear that it will override whatever is defined in the yaml config. fix: clarifying build --single-target Make it more clear that it will override whatever is defined in the yaml config. refs #3265 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
bcdb7e650c
commit
d22d67d923
@ -77,10 +77,10 @@ When using ` + "`--single-target`" + `, the ` + "`GOOS`" + ` and ` + "`GOARCH`"
|
|||||||
cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Remove the dist folder before building")
|
cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Remove the dist folder before building")
|
||||||
cmd.Flags().IntVarP(&root.opts.parallelism, "parallelism", "p", 0, "Amount tasks to run concurrently (default: number of CPUs)")
|
cmd.Flags().IntVarP(&root.opts.parallelism, "parallelism", "p", 0, "Amount tasks to run concurrently (default: number of CPUs)")
|
||||||
cmd.Flags().DurationVar(&root.opts.timeout, "timeout", 30*time.Minute, "Timeout to the entire build process")
|
cmd.Flags().DurationVar(&root.opts.timeout, "timeout", 30*time.Minute, "Timeout to the entire build process")
|
||||||
cmd.Flags().BoolVar(&root.opts.singleTarget, "single-target", false, "Builds only for current GOOS and GOARCH")
|
cmd.Flags().BoolVar(&root.opts.singleTarget, "single-target", false, "Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file")
|
||||||
cmd.Flags().StringArrayVar(&root.opts.ids, "id", nil, "Builds only the specified build ids")
|
cmd.Flags().StringArrayVar(&root.opts.ids, "id", nil, "Builds only the specified build ids")
|
||||||
cmd.Flags().BoolVar(&root.opts.deprecated, "deprecated", false, "Force print the deprecation message - tests only")
|
cmd.Flags().BoolVar(&root.opts.deprecated, "deprecated", false, "Force print the deprecation message - tests only")
|
||||||
cmd.Flags().StringVarP(&root.opts.output, "output", "o", "", "Copy the binary to the path after the build. Only taken into account when using --single-target and a single id (either with --id or if config only has one build)")
|
cmd.Flags().StringVarP(&root.opts.output, "output", "o", "", "Copy the binary to the path after the build. Only taken into account when using --single-target and a single id (either with --id or if configuration only has one build)")
|
||||||
_ = cmd.Flags().MarkHidden("deprecated")
|
_ = cmd.Flags().MarkHidden("deprecated")
|
||||||
|
|
||||||
root.cmd = cmd
|
root.cmd = cmd
|
||||||
@ -157,7 +157,7 @@ func setupBuildSingleTarget(ctx *context.Context) {
|
|||||||
if goarch == "" {
|
if goarch == "" {
|
||||||
goarch = runtime.GOARCH
|
goarch = runtime.GOARCH
|
||||||
}
|
}
|
||||||
log.Infof("building only for %s/%s", goos, goarch)
|
log.WithField("reason", "single target is enabled").Warnf("building only for %s/%s", goos, goarch)
|
||||||
if len(ctx.Config.Builds) == 0 {
|
if len(ctx.Config.Builds) == 0 {
|
||||||
ctx.Config.Builds = append(ctx.Config.Builds, config.Build{})
|
ctx.Config.Builds = append(ctx.Config.Builds, config.Build{})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user