diff --git a/Makefile b/Makefile index ed43e5884..6f58f82e8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..6b60281ad --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +v0.17.0 diff --git a/cmd/s3-gw/app.go b/cmd/s3-gw/app.go index 3e6ff669a..bea589879 100644 --- a/cmd/s3-gw/app.go +++ b/cmd/s3-gw/app.go @@ -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