1
0
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:
Carlos Alexandro Becker 2017-01-30 08:06:48 -02:00
parent edf6036041
commit 289921d278
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -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 != "" {