Unverified Commit 9fd3c98d authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #265863 from SuperSandro2000/govulncheck-version

govulncheck: fix version information
parents 107fd4b8 b66dea47
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
{ lib
, buildGoModule
, fetchFromGitHub
, substituteAll
}:

buildGoModule rec {
@@ -14,6 +15,14 @@ buildGoModule rec {
    hash = "sha256-cewQ03dK/k3mXevE09M01Yox/3ZWP6IrG0H4QsZMzy8=";
  };

  patches = [
    # patch in version information
    (substituteAll {
      src = ./version.patch;
      inherit version;
    })
  ];

  vendorHash = "sha256-r9XshbgVA5rppJF46SFYPad344ZHMLWTHTnL6vbIFH8=";

  subPackages = [
+15 −0
Original line number Diff line number Diff line
diff --git a/internal/scan/run.go b/internal/scan/run.go
index fa7fe37..216ca43 100644
--- a/internal/scan/run.go
+++ b/internal/scan/run.go
@@ -99,8 +99,8 @@ func scannerVersion(cfg *config, bi *debug.BuildInfo) {
 	if bi.Path != "" {
 		cfg.ScannerName = path.Base(bi.Path)
 	}
-	if bi.Main.Version != "" && bi.Main.Version != "(devel)" {
-		cfg.ScannerVersion = bi.Main.Version
+	if true {
+		cfg.ScannerVersion = "@version@"
 		return
 	}