Skip to content

Vendor-specified build date is ignored even if there is no git info #10053

@anthonyfok

Description

@anthonyfok

Since v0.96.0 (with commit 64afb7c), buildDate is read from debug.BuildInfo which is really awesome!

However, -ldflags "-X github.com/gohugoio/hugo/common/hugo.buildDate" is now ignored, thus leading to BuildDate=unknown in the version string for Debian (and probably Fedora) package build where .git/ is removed from the source package and thus Git info is unavailable.

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.101.0+extended linux/amd64 BuildDate=unknown VendorInfo=debian:0.101.0-1

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions