corerad: set linkTimestamp from file in repository root
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
parent
10f75b2fed
commit
477cf953be
@ -13,10 +13,16 @@ buildGoModule rec {
|
|||||||
|
|
||||||
vendorSha256 = "19hp8xqr50v8h9vblihalvkb9ll8c0v4p071j9j1zkbjhnb07rca";
|
vendorSha256 = "19hp8xqr50v8h9vblihalvkb9ll8c0v4p071j9j1zkbjhnb07rca";
|
||||||
|
|
||||||
buildFlagsArray = ''
|
# Since the tarball pulled from GitHub doesn't contain git tag information,
|
||||||
-ldflags=
|
# we fetch the expected tag's timestamp from a file in the root of the
|
||||||
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=1593050100
|
# repository.
|
||||||
-X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}
|
preBuild = ''
|
||||||
|
buildFlagsArray=(
|
||||||
|
-ldflags="
|
||||||
|
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=$(<.gittagtime)
|
||||||
|
-X github.com/mdlayher/corerad/internal/build.linkVersion=v${version}
|
||||||
|
"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user