Maybe delete local benchmark before pull..
This commit is contained in:
@@ -48,7 +48,11 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
log.Printf("Benchmarking done; Fetching benchmark branch")
|
||||
log.Printf("Benchmarking done; writing results to git...")
|
||||
log.Printf("Removing local benchmark branch")
|
||||
removeLocalBenchmarkBranch()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
log.Printf("Fetching benchmark branch")
|
||||
fetchBenchmark()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
log.Printf("Checking out benchmark branch")
|
||||
@@ -65,6 +69,15 @@ func main() {
|
||||
log.Printf("Done")
|
||||
}
|
||||
|
||||
func removeLocalBenchmarkBranch() {
|
||||
gitBranch := exec.Command("git", "branch", "-D", "benchmark")
|
||||
gitBranch.Dir = "../"
|
||||
out, err := gitBranch.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Could not remove local benchmark branch with code %v and error %v", err, string(out))
|
||||
}
|
||||
}
|
||||
|
||||
func getHeadHash() string {
|
||||
cmd := exec.Command("git", "rev-parse", "HEAD")
|
||||
cmd.Dir = "../"
|
||||
|
Reference in New Issue
Block a user