s3-gw: drop build time setting

It's not properly set anyway and it's a bad practice for build
reproducibility.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2021-05-20 13:01:12 +03:00
parent e622f1987b
commit ef8684c11d
3 changed files with 3 additions and 8 deletions

View file

@ -19,8 +19,6 @@ var (
[]string{ []string{
// current version // current version
"version", "version",
// build time of the current version
"build_time",
}, },
) )
@ -62,7 +60,7 @@ func (s *stats) Describe(ch chan<- *prometheus.Desc) {
func (s *stats) Collect(ch chan<- prometheus.Metric) { func (s *stats) Collect(ch chan<- prometheus.Metric) {
// Expose current version information // Expose current version information
versionInfo.WithLabelValues(misc.Version, misc.Build).Set(1.0) versionInfo.WithLabelValues(misc.Version).Set(1.0)
// connect collectors // connect collectors
collectHTTPMetrics(ch) collectHTTPMetrics(ch)

View file

@ -181,7 +181,6 @@ func newSettings() *viper.Viper {
// set prefers: // set prefers:
v.Set(cfgApplicationName, misc.ApplicationName) v.Set(cfgApplicationName, misc.ApplicationName)
v.Set(cfgApplicationVersion, misc.Version) v.Set(cfgApplicationVersion, misc.Version)
v.Set(cfgApplicationBuildTime, misc.Build)
// set defaults: // set defaults:
@ -229,7 +228,7 @@ func newSettings() *viper.Viper {
switch { switch {
case help != nil && *help: case help != nil && *help:
fmt.Printf("NeoFS S3 Gateway %s (%s)\n", misc.Version, misc.Build) fmt.Printf("NeoFS S3 Gateway %s\n", misc.Version)
flags.PrintDefaults() flags.PrintDefaults()
fmt.Println() fmt.Println()
@ -256,7 +255,7 @@ func newSettings() *viper.Viper {
os.Exit(0) os.Exit(0)
case version != nil && *version: case version != nil && *version:
fmt.Printf("NeoFS S3 Gateway %s (%s)\n", misc.Version, misc.Build) fmt.Printf("NeoFS S3 Gateway %s\n", misc.Version)
os.Exit(0) os.Exit(0)
case ttl != nil && ttl.Minutes() < minimumTTLInMinutes: case ttl != nil && ttl.Minutes() < minimumTTLInMinutes:
fmt.Printf("connection ttl should not be less than %s", defaultTTL) fmt.Printf("connection ttl should not be less than %s", defaultTTL)

View file

@ -9,8 +9,6 @@ const (
) )
var ( var (
// Build holds build timestamp.
Build = "now"
// Version contains application version. // Version contains application version.
Version = "dev" Version = "dev"
) )