Prepare to release

- set output for flag set
- change env prefix for all environments
- migrate to CDN SDK release v0.1.0

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
Evgeniy Kulikov 2020-12-02 11:52:07 +03:00
parent 420531d12a
commit 01f13ef210
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
5 changed files with 7 additions and 7 deletions

View file

@ -18,7 +18,7 @@ RUN set -x \
-v \ -v \
-mod=vendor \ -mod=vendor \
-trimpath \ -trimpath \
-ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N) -X main.Prefix=HTTP_GW" \ -ldflags "${LDFLAGS} -X main.Build=$(date -u +%s%N)" \
-o /go/bin/neofs-gw ./ \ -o /go/bin/neofs-gw ./ \
&& upx -3 /go/bin/neofs-gw && upx -3 /go/bin/neofs-gw

4
go.mod
View file

@ -4,7 +4,7 @@ go 1.13
require ( require (
github.com/fasthttp/router v1.3.3 github.com/fasthttp/router v1.3.3
github.com/nspcc-dev/cdn-neofs-sdk v0.0.0 github.com/nspcc-dev/cdn-neofs-sdk v0.1.0
github.com/nspcc-dev/neofs-api-go v1.20.3 github.com/nspcc-dev/neofs-api-go v1.20.3
github.com/nspcc-dev/neofs-crypto v0.3.0 github.com/nspcc-dev/neofs-crypto v0.3.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
@ -16,5 +16,3 @@ require (
go.uber.org/zap v1.16.0 go.uber.org/zap v1.16.0
google.golang.org/grpc v1.33.2 google.golang.org/grpc v1.33.2
) )
replace github.com/nspcc-dev/cdn-neofs-sdk => ../sdk

2
go.sum
View file

@ -292,6 +292,8 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nspcc-dev/cdn-neofs-sdk v0.1.0 h1:nexBQL32WeQC2mvVMiWlOqI2enKcIJlFyxejU1FeBNo=
github.com/nspcc-dev/cdn-neofs-sdk v0.1.0/go.mod h1:ujzmbHoxhuyY4SgHUDSwtfZQNHu06izC4xOkPj+YziY=
github.com/nspcc-dev/dbft v0.0.0-20191205084618-dacb1a30c254/go.mod h1:w1Ln2aT+dBlPhLnuZhBV+DfPEdS2CHWWLp5JTScY3bw= github.com/nspcc-dev/dbft v0.0.0-20191205084618-dacb1a30c254/go.mod h1:w1Ln2aT+dBlPhLnuZhBV+DfPEdS2CHWWLp5JTScY3bw=
github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA51EGfb5GS/HOv7VdmngNRTssSeQ729dvGY= github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA51EGfb5GS/HOv7VdmngNRTssSeQ729dvGY=
github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk= github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk=

View file

@ -1,9 +1,8 @@
package main package main
const Prefix = "HTTP_GW"
var ( var (
Build = "now" Build = "now"
Version = "dev" Version = "dev"
// TODO should be replaced with HTTP_GW
Prefix = "GW"
) )

View file

@ -74,6 +74,7 @@ func settings() *viper.Viper {
// flags setup: // flags setup:
flags := pflag.NewFlagSet("commandline", pflag.ExitOnError) flags := pflag.NewFlagSet("commandline", pflag.ExitOnError)
flags.SetOutput(os.Stdout)
flags.SortFlags = false flags.SortFlags = false
flags.Bool("pprof", false, "enable pprof") flags.Bool("pprof", false, "enable pprof")