refactor: hide domain info if only single domain in drone setting. (#70)

This commit is contained in:
Bo-Yi Wu
2017-05-15 17:16:21 +08:00
committed by GitHub
parent 13e681cc3b
commit 7a88a784b2
+7 -1
View File
@@ -103,7 +103,11 @@ func globList(paths []string) []string {
}
func (p Plugin) log(host string, message ...interface{}) {
fmt.Printf("%s: %s", host, fmt.Sprintln(message...))
if count := len(p.Config.Host); count == 1 {
fmt.Printf("%s", fmt.Sprintln(message...))
} else {
fmt.Printf("%s: %s", host, fmt.Sprintln(message...))
}
}
func (p *Plugin) removeDestFile(ssh *easyssh.MakeConfig) error {
@@ -294,7 +298,9 @@ func (p *Plugin) Exec() error {
}
}
fmt.Println("================================================")
fmt.Println("Successfully executed transfer data to all host.")
fmt.Println("================================================")
return nil
}