feat: embed build version info in binaries

This commit is contained in:
2026-03-02 19:16:53 +08:00
parent 489c2d191c
commit 676a6e659a
4 changed files with 36 additions and 4 deletions

View File

@@ -41,7 +41,8 @@ func main() {
flag.Parse()
if *version {
fmt.Printf("inp2pc version %s\n", config.Version)
fmt.Printf("inp2pc version %s\ncommit: %s\nbuild: %s\ngo: %s\n",
config.Version, config.GitCommit, config.BuildTime, config.GoVersion)
os.Exit(0)
}