[#287] Add version

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
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 # Common variables
REPO ?= $(shell go list -m) 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 BINDIR = bin
# Binaries to build # Binaries to build

1
VERSION Normal file
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/cache"
"github.com/nspcc-dev/neofs-s3-gw/api/handler" "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/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-s3-gw/internal/wallet"
"github.com/nspcc-dev/neofs-sdk-go/policy" "github.com/nspcc-dev/neofs-sdk-go/policy"
"github.com/nspcc-dev/neofs-sdk-go/pool" "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. // Wait waits for application to finish.
func (a *App) Wait() { 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 <-a.webDone // wait for web-server to be stopped