appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
144 stars 30 forks source link

feat: Add timeout flag. #26

Closed appleboy closed 7 years ago

appleboy commented 7 years ago

fix #25

codecov-io commented 7 years ago

Current coverage is 94.87% (diff: 100%)

Merging #26 into master will increase coverage by 0.06%

@@             master        #26   diff @@
==========================================
  Files             2          2          
  Lines            77         78     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits             73         74     +1   
  Misses            2          2          
  Partials          2          2          

Powered by Codecov. Last update e5ead0f...ead7eef

yzgw commented 7 years ago

I got an error below on drone 0.5. I guess timeout option is conflicting with target option.

Drone SCP flag redefined: t
panic: Drone SCP flag redefined: t
goroutine 1 [running]:
panic(0x62d420, 0xc42000ab50)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
flag.(*FlagSet).Var(0xc420012360, 0x794bc0, 0xc4200112c0, 0x6818f8, 0x1, 0x685cd9, 0x19)
    /usr/local/go/src/flag/flag.go:791 +0x43e
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.StringSliceFlag.ApplyWithError.func1(0x6818f8, 0x1)
    /srv/app/src/github.com/appleboy/drone-scp/vendor/github.com/urfave/cli/flag.go:187 +0x89
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.eachName(0x6818f0, 0x9, 0xc42003b588)
    /srv/app/src/github.com/appleboy/drone-scp/vendor/github.com/urfave/cli/flag.go:94 +0xb5
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.StringSliceFlag.ApplyWithError(0x6818f0, 0x9, 0x685cd9, 0x19, 0x6858cb, 0x18, 0x0, 0xc4200112c0, 0xc420012360, 0x1, ...)
    /srv/app/src/github.com/appleboy/drone-scp/vendor/github.com/urfave/cli/flag.go:188 +0x162
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.(*StringSliceFlag).ApplyWithError(0xc4200163c0, 0xc420012360, 0xc4200163c0, 0xc42003b668)
    <autogenerated>:42 +0x6d
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.flagSet(0x681563, 0x9, 0xc4200722c0, 0x17, 0x2c, 0x0, 0x434e08, 0xc42001c00c)
    /srv/app/src/github.com/appleboy/drone-scp/vendor/github.com/urfave/cli/flag.go:80 +0x11b
github.com/appleboy/drone-scp/vendor/github.com/urfave/cli.(*App).Run(0xc420088340, 0xc42000a200, 0x1, 0x1, 0x0, 0x0)
    /srv/app/src/github.com/appleboy/drone-scp/vendor/github.com/urfave/cli/app.go:181 +0x177
main.main()
    /srv/app/src/github.com/appleboy/drone-scp/main.go:171 +0x11b5
appleboy commented 7 years ago

@yzgw Fixed. Please download the latest image.