diff --git a/cmd_deploy.go b/cmd_deploy.go index cf83a14..b8bfdc1 100644 --- a/cmd_deploy.go +++ b/cmd_deploy.go @@ -26,7 +26,7 @@ func checkDeployDir() string { } githash := warren.GitHash() - dst := "deploy/" + githash + "/" + dst := "deploy/" + githash _, err = os.Stat(dst) if err != nil { os.Mkdir(dst, os.ModeDir|0777) @@ -54,6 +54,6 @@ func deployRun(cmd *Command, args ...string) { fmt.Println(files) for _, file := range files { - cp(dst+file, file) + cp(dst+"/"+file, file) } } diff --git a/lib/warren/warren.go b/lib/warren/warren.go index fb3d3af..afa88f2 100644 --- a/lib/warren/warren.go +++ b/lib/warren/warren.go @@ -13,7 +13,7 @@ func GitHash() string { if err != nil { log.Fatal(err) } - return string(hash) + return strings.TrimSpace(string(hash)) } func GitBranch() string {