mirror of
https://github.com/r-smith/deceptifeed.git
synced 2025-11-02 21:23:39 +00:00
Add setting and getting version information
- Add `Version` string var to config package for storing version information. - Update Makefile to set the `Version` variable at build time using the latest Git tag. - Add `-version` flag to main package to print version information and exit. - Remove setting the GO111MODULE environment variable from Makefile when building. It's not needed.
This commit is contained in:
@@ -12,6 +12,11 @@ import (
|
||||
"github.com/r-smith/deceptifeed/internal/logrotate"
|
||||
)
|
||||
|
||||
// Version stores Deceptifeed's version number. This variable is set at build
|
||||
// time using the `-X` option with `-ldflags` and is assigned the latest Git
|
||||
// tag. Refer to the Makefile in the project root for details on how it's set.
|
||||
var Version = "undefined"
|
||||
|
||||
// This block of constants defines the default application settings when no
|
||||
// configuration file is provided.
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user