containerlab: fix version definition in LDFLAGS

Without the change, containerlab will always report the installed
version to be 0.0.0, as wrong LDFLAGS were used in the package. The
correct LDFLAGS can be seen in containerlab Makefile:

https://github.com/srl-labs/containerlab/blob/main/Makefile

If the version cannot be detected, e.g., containerlabs vscode extension
will not work.
This commit is contained in:
Sebastian Rieger
2025-05-04 12:33:28 +02:00
parent 91bf6dffa2
commit 6371431199
+3 -3
View File
@@ -23,9 +23,9 @@ buildGoModule rec {
ldflags = [
"-s"
"-w"
"-X github.com/srl-labs/containerlab/cmd.version=${version}"
"-X github.com/srl-labs/containerlab/cmd.commit=${src.rev}"
"-X github.com/srl-labs/containerlab/cmd.date=1970-01-01T00:00:00Z"
"-X github.com/srl-labs/containerlab/cmd/version.Version=${version}"
"-X github.com/srl-labs/containerlab/cmd/version.commit=${src.rev}"
"-X github.com/srl-labs/containerlab/cmd/version.date=1970-01-01T00:00:00Z"
];
preCheck = ''