Skip to content

Commit

Permalink
Merge pull request #7250 from dolthub/db/build-dolts
Browse files Browse the repository at this point in the history
[no-release-notes] db/build dolts
  • Loading branch information
coffeegoddd authored Jan 4, 2024
2 parents 2e873b3 + 1db2736 commit ce7c324
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion go/performance/utils/dolt_builder/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package main

import (
"context"
"fmt"
"log"
"os"
Expand All @@ -36,7 +37,7 @@ func main() {
os.Exit(2)
}

err := builder.Run(commitList)
err := builder.Run(context.Background(), commitList)
if err != nil {
log.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions go/performance/utils/dolt_builder/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func GitVersion(ctx context.Context) error {
return nil
}

// GitClone clones the dolt repo into `${dir}/dolt.git`
func GitCloneBare(ctx context.Context, dir string) error {
clone := ExecCommand(ctx, "git", "clone", "--bare", GithubDolt)
// GitCloneBare clones a repo
func GitCloneBare(ctx context.Context, dir, url string) error {
clone := ExecCommand(ctx, "git", "clone", "--bare", url)
clone.Dir = dir
return clone.Run()
}
Expand Down
6 changes: 2 additions & 4 deletions go/performance/utils/dolt_builder/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import (

const envDoltBin = "DOLT_BIN"

func Run(commitList []string) error {
parentCtx := context.Background()

func Run(parentCtx context.Context, commitList []string) error {
doltBin, err := getDoltBin()
if err != nil {
return err
Expand All @@ -56,7 +54,7 @@ func Run(commitList []string) error {
}

// clone dolt source
err = GitCloneBare(parentCtx, tempDir)
err = GitCloneBare(parentCtx, tempDir, GithubDolt)
if err != nil {
return err
}
Expand Down

0 comments on commit ce7c324

Please sign in to comment.