Add more build metadata to executable

This commit is contained in:
Elliott Sales de Andrade 2023-01-01 20:22:52 -05:00
parent 4afa291970
commit 48108bbbb7

View File

@ -82,7 +82,7 @@ rm hugolib/hugo_modules_test.go
%go_generate_buildrequires
%build
BUILDTAGS=extended %gobuild -o %{gobuilddir}/bin/hugo %{goipath}
BUILDTAGS=extended LDFLAGS="${LDFLAGS} -X %{goipath}/common/hugo.buildDate=$(date --iso=seconds --date=@$SOURCE_DATE_EPOCH) -X %{goipath}/common/hugo.vendorInfo=Fedora:%{version}-%{release}" %gobuild -o %{gobuilddir}/bin/hugo %{goipath}
%{gobuilddir}/bin/hugo gen autocomplete >hugo-completion
%{gobuilddir}/bin/hugo gen man