Build: Add -buildvcs=false flag to go build (#109472)

This commit is contained in:
Matheus Macabu
2025-08-12 08:57:32 +02:00
committed by GitHub
parent 402572c580
commit 0d8518dc2f
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -203,6 +203,10 @@ func doBuild(binaryName, pkg string, opts BuildOpts) error {
args = append(args, "-race")
}
// We should not publish Grafana as a Go module, disabling vcs changes the version to (devel)
// and works better with SBOM and Vulnerability Scanners.
args = append(args, "-buildvcs=false")
args = append(args, "-o", binary)
args = append(args, pkg)