mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
using version on build ldflag too
This commit is contained in:
parent
edf6036041
commit
289921d278
@ -41,7 +41,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
}
|
||||
|
||||
func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
ldflags := ctx.Config.Build.Ldflags + " -X main.version=" + ctx.Git.CurrentTag
|
||||
ldflags := ctx.Config.Build.Ldflags + " -X main.version=" + ctx.Version
|
||||
output := "dist/" + name + "/" + ctx.Config.Build.BinaryName + extFor(goos)
|
||||
log.Println("Building", output)
|
||||
if ctx.Config.Build.Hooks.Pre != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user