[packages/vault] embed version info to binary

glen glen at pld-linux.org
Thu Dec 15 11:35:59 CET 2016


commit 9a53f01b8a6e027e51b69e8bceb92ca79245d532
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Dec 15 12:35:42 2016 +0200

    embed version info to binary

 vault.spec | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/vault.spec b/vault.spec
index 32ff25e..73cdd92 100644
--- a/vault.spec
+++ b/vault.spec
@@ -38,6 +38,8 @@ ln -s ../../.. src/%{import_path}
 %build
 export GOPATH=$(pwd)
 
+base=%{import_path}/version
+LDFLAGS="-X $base.Version=%{version} -X $base.VersionPrerelease=%{release}"
 %gobuild -o bin/%{name}
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vault.git/commitdiff/9a53f01b8a6e027e51b69e8bceb92ca79245d532



More information about the pld-cvs-commit mailing list