Track benchmark before checkout
This commit is contained in:
@@ -55,6 +55,9 @@ func main() {
|
||||
log.Printf("Fetching benchmark branch")
|
||||
fetchBenchmark()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
log.Printf("Tracking benchmark branch")
|
||||
trackBenchmark()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
log.Printf("Checking out benchmark branch")
|
||||
checkoutBenchmark()
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
@@ -97,8 +100,17 @@ func fetchBenchmark() {
|
||||
}
|
||||
}
|
||||
|
||||
func trackBenchmark() {
|
||||
gitTrack := exec.Command("git", "branch", "--track", "benchmark", "origin/benchmark")
|
||||
gitTrack.Dir = "../"
|
||||
out, err := gitTrack.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatalf("Could not track benchmark branch with code %v and error %v", err, string(out))
|
||||
}
|
||||
}
|
||||
|
||||
func checkoutBenchmark() {
|
||||
gitCheckout := exec.Command("git", "checkout", "origin/benchmark")
|
||||
gitCheckout := exec.Command("git", "checkout", "benchmark")
|
||||
gitCheckout.Dir = "../"
|
||||
out, err := gitCheckout.CombinedOutput()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user