Skip to content

Commit

Permalink
Remove ensureRepo function (#61)
Browse files Browse the repository at this point in the history
* Remove `ensureRepo` function

* fix

* fix
  • Loading branch information
wojtek-coreum authored Feb 22, 2024
1 parent df3ae80 commit ac01e32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions build/bdjuno/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import (
"path/filepath"

"github.com/CoreumFoundation/coreum-tools/pkg/build"
"github.com/CoreumFoundation/crust/build/git"
"github.com/CoreumFoundation/crust/build/golang"
"github.com/CoreumFoundation/crust/build/tools"
)

const (
repoURL = "https://github.com/CoreumFoundation/bdjuno.git"
repoPath = "../bdjuno"
repoPath = "."
binaryName = "bdjuno"
binaryPath = "bin/" + binaryName
)
Expand All @@ -33,15 +31,9 @@ func Test(ctx context.Context, deps build.DepsFunc) error {
}

func buildBDJuno(ctx context.Context, deps build.DepsFunc, targetPlatform tools.TargetPlatform) error {
deps(ensureRepo)

return golang.Build(ctx, deps, golang.BinaryBuildConfig{
TargetPlatform: targetPlatform,
PackagePath: filepath.Join(repoPath, "cmd", "bdjuno"),
BinOutputPath: filepath.Join("bin", ".cache", binaryName, targetPlatform.String(), "bin", binaryName),
})
}

func ensureRepo(ctx context.Context, deps build.DepsFunc) error {
return git.EnsureRepo(ctx, repoURL)
}
2 changes: 1 addition & 1 deletion build/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func main() {
}

changeWorkingDir()
return build.Do(ctx, "coreum", flags.Args(), exec)
return build.Do(ctx, "bdjuno", flags.Args(), exec)
})
}

Expand Down

0 comments on commit ac01e32

Please sign in to comment.