[#287] Add version

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
remotes/KirillovDenis/bugfix/681-fix_acl_parsing
Denis Kirillov 2021-12-06 09:58:15 +03:00 committed by Alex Vanin
parent 8127d68128
commit c9f1cf3cb6
3 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# Common variables
REPO ?= $(shell go list -m)
VERSION ?= "$(shell git describe --tags 2>/dev/null || git rev-parse --short HEAD | sed 's/^v//')"
VERSION ?= $(shell git describe --tags 2>/dev/null || cat VERSION 2>/dev/null || echo "develop")
BINDIR = bin
# Binaries to build

1
VERSION 100644
View File

@ -0,0 +1 @@
v0.17.0

View File

@ -15,6 +15,7 @@ import (
"github.com/nspcc-dev/neofs-s3-gw/api/cache"
"github.com/nspcc-dev/neofs-s3-gw/api/handler"
"github.com/nspcc-dev/neofs-s3-gw/api/layer"
"github.com/nspcc-dev/neofs-s3-gw/internal/version"
"github.com/nspcc-dev/neofs-s3-gw/internal/wallet"
"github.com/nspcc-dev/neofs-sdk-go/policy"
"github.com/nspcc-dev/neofs-sdk-go/pool"
@ -155,7 +156,7 @@ func newApp(ctx context.Context, l *zap.Logger, v *viper.Viper) *App {
// Wait waits for application to finish.
func (a *App) Wait() {
a.log.Info("application started")
a.log.Info("application started", zap.String("version", version.Version))
<-a.webDone // wait for web-server to be stopped