Commit 63714311 authored by Sebastian Rieger's avatar Sebastian Rieger
Browse files

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.
parent 91bf6dff
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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 = ''