mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-06-04 18:23:59 +08:00
fix(error): show error log.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/appleboy/easyssh-proxy"
|
"github.com/appleboy/easyssh-proxy"
|
||||||
@@ -10,7 +11,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Version set at compile-time
|
// Version set at compile-time
|
||||||
var Version = "v1.0.0-dev"
|
var (
|
||||||
|
Version string
|
||||||
|
BuildNum string
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
@@ -217,7 +221,15 @@ VERSION:
|
|||||||
REPOSITORY:
|
REPOSITORY:
|
||||||
Github: https://github.com/appleboy/drone-scp
|
Github: https://github.com/appleboy/drone-scp
|
||||||
`
|
`
|
||||||
app.Run(os.Args)
|
app.Version = Version
|
||||||
|
|
||||||
|
if BuildNum != "" {
|
||||||
|
app.Version = app.Version + "+" + BuildNum
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := app.Run(os.Args); err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func run(c *cli.Context) error {
|
func run(c *cli.Context) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user