Stamp the git tag or short commit into the binary (closes #10)
check / check (push) Failing after 3s

rtnetmon had no version. main.Version is now set at link time and logged
in the first startup line. The Dockerfile takes it from the VERSION build
argument when one is given, otherwise from `git describe --tags --always`
of the .git the build context now carries, and fails the build if the
context carries .git and no version comes out. .dockerignore follows the
canonical copy: .git is sent, .git/config, which can hold a credential,
is not.

Model: opus-5-5
This commit is contained in:
2026-10-02 06:24:22 +00:00
parent 769511dec2
commit 51d2bd24df
5 changed files with 55 additions and 21 deletions
+1 -1
View File
@@ -3,4 +3,4 @@ package cli
import "github.com/spf13/cobra"
// NewRootCmd exposes newRootCmd for external tests.
func NewRootCmd() *cobra.Command { return newRootCmd() }
func NewRootCmd() *cobra.Command { return newRootCmd("dev") }