forked from Silverfish/proton-bridge
refactor: dedicated constants package, no explicit bridge version
This commit is contained in:
committed by
Jakub Cuth
parent
32ca7b3903
commit
522cadb8b1
@ -172,6 +172,11 @@ func (c *Config) IsDevMode() bool {
|
||||
return os.Getenv("PROTONMAIL_ENV") == "dev"
|
||||
}
|
||||
|
||||
// GetVersion returns the version.
|
||||
func (c *Config) GetVersion() string {
|
||||
return c.version
|
||||
}
|
||||
|
||||
// GetLogDir returns folder for log files.
|
||||
func (c *Config) GetLogDir() string {
|
||||
return c.appDirs.UserLogs()
|
||||
|
||||
26
pkg/constants/constants.go
Normal file
26
pkg/constants/constants.go
Normal file
@ -0,0 +1,26 @@
|
||||
// Package constants contains variables that are set via ldflags during build.
|
||||
package constants
|
||||
|
||||
// nolint[gochecknoglobals]
|
||||
var (
|
||||
// Version of the build.
|
||||
Version = ""
|
||||
|
||||
// Revision is current hash of the build.
|
||||
Revision = ""
|
||||
|
||||
// BuildTime stamp of the build.
|
||||
BuildTime = ""
|
||||
|
||||
// AppShortName to make setup.
|
||||
AppShortName = "bridge"
|
||||
|
||||
// DSNSentry client keys to be able to report crashes to Sentry.
|
||||
DSNSentry = ""
|
||||
|
||||
// LongVersion is derived from Version and Revision.
|
||||
LongVersion = Version + " (" + Revision + ")"
|
||||
|
||||
// BuildVersion is derived from LongVersion and BuildTime.
|
||||
BuildVersion = LongVersion + " " + BuildTime
|
||||
)
|
||||
Reference in New Issue
Block a user