@@ -33,20 +33,19 @@ import (
3333 "time"
3434
3535 "github.com/ethereum/go-ethereum/log"
36- colorable "github.com/mattn/go-colorable"
3736 "github.com/pborman/uuid"
3837
3938 cli "gopkg.in/urfave/cli.v1"
4039)
4140
42- func generateEndpoints (scheme string , cluster string , from int , to int ) {
41+ func generateEndpoints (scheme string , cluster string , app string , from int , to int ) {
4342 if cluster == "prod" {
4443 for port := from ; port <= to ; port ++ {
4544 endpoints = append (endpoints , fmt .Sprintf ("%s://%v.swarm-gateways.net" , scheme , port ))
4645 }
4746 } else {
4847 for port := from ; port <= to ; port ++ {
49- endpoints = append (endpoints , fmt .Sprintf ("%s://swarm -%v-%s.stg.swarm-gateways.net" , scheme , port , cluster ))
48+ endpoints = append (endpoints , fmt .Sprintf ("%s://%s -%v-%s.stg.swarm-gateways.net" , scheme , app , port , cluster ))
5049 }
5150 }
5251
@@ -57,11 +56,11 @@ func generateEndpoints(scheme string, cluster string, from int, to int) {
5756
5857func cliUploadAndSync (c * cli.Context ) error {
5958 log .PrintOrigins (true )
60- log .Root ().SetHandler (log .LvlFilterHandler (log .Lvl (verbosity ), log .StreamHandler (colorable . NewColorableStderr () , log .TerminalFormat (true ))))
59+ log .Root ().SetHandler (log .LvlFilterHandler (log .Lvl (verbosity ), log .StreamHandler (os . Stdout , log .TerminalFormat (true ))))
6160
62- defer func (now time.Time ) { log .Info ("total time" , "time" , time .Since (now ), "size (kb) " , filesize ) }(time .Now ())
61+ defer func (now time.Time ) { log .Info ("total time" , "time" , time .Since (now ), "kb " , filesize ) }(time .Now ())
6362
64- generateEndpoints (scheme , cluster , from , to )
63+ generateEndpoints (scheme , cluster , appName , from , to )
6564
6665 log .Info ("uploading to " + endpoints [0 ] + " and syncing" )
6766
0 commit comments