diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-12-26 11:31:58 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-12-26 11:31:58 +0100 |
commit | 214e9745b6ee3d1e5639256e05ae8aa5fd514fb3 (patch) | |
tree | 464a99d852217b48f595c6ca1ce81fe5b9fb13d6 | |
parent | ecc89227524c9b6f5a67cd06d30ae97c0cef8198 (diff) |
releaser: Use Git short commit in release binaries
Fixes #5562
-rw-r--r-- | goreleaser-extended.yml | 6 | ||||
-rw-r--r-- | goreleaser.yml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/goreleaser-extended.yml b/goreleaser-extended.yml index ce4b82a94..8be278880 100644 --- a/goreleaser-extended.yml +++ b/goreleaser-extended.yml @@ -2,7 +2,7 @@ project_name: hugo_extended builds: - binary: hugo ldflags: - - -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .Commit }} + - -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} - "-extldflags '-static'" env: - CGO_ENABLED=1 @@ -16,7 +16,7 @@ builds: goarch: - amd64 - binary: hugo - ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .Commit }} + ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} env: - CGO_ENABLED=1 - CC=o64-clang @@ -29,7 +29,7 @@ builds: goarch: - amd64 - binary: hugo - ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .Commit }} + ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} env: - CGO_ENABLED=1 flags: diff --git a/goreleaser.yml b/goreleaser.yml index e52312b9c..5f3e444cc 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -2,7 +2,7 @@ project_name: hugo build: main: main.go binary: hugo - ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .Commit }} + ldflags: -s -w -X github.com/gohugoio/hugo/common/hugo.buildDate={{.Date}} -X github.com/gohugoio/hugo/common/hugo.commitHash={{ .ShortCommit }} env: - CGO_ENABLED=0 goos: |