mirror of
https://github.com/Icinga/icingadb.git
synced 2025-12-18 23:16:16 -05:00
This commit adds the build information (Go version, Git commit) and system information (distribution with version) to the output of `icingadb --version`. When exporting the source code using `git archive`, Git will insert the version information using the export-subst attribute (adds both a pretty version string like `git describe` and the commit hash). `go build` also adds some Git commit information to the resulting binary when building from a Git working directory (only the commit hash and a flag if there are uncommitted changes, but no pretty version string). Note that `go build` does not include Git version information in the binary, so when running directly from a Git working directory, commit information won't be available in the binary, but when doing this, you should be well aware which version you're running anyways. System information is obtained from the `os-release` file.
2 lines
81 B
Text
2 lines
81 B
Text
# Include version information on `git archive'
|
|
/internal/version.go export-subst
|