MCPcopy
hub / github.com/dgraph-io/dgraph / getHash

Function getHash

dgraphtest/image.go:201–209  ·  view source on GitHub ↗
(ref string)

Source from the content-addressed store, hash-verified

199}
200
201func getHash(ref string) (string, error) {
202 cmd := exec.Command("git", "rev-parse", ref)
203 cmd.Dir = repoDir
204 if out, err := cmd.CombinedOutput(); err != nil {
205 return "", errors.Wrapf(err, "error while running rev-parse on [%v]\noutput:%v", ref, string(out))
206 } else {
207 return strings.TrimSpace(string(out)), nil
208 }
209}
210
211func buildDgraphBinary(dir, binaryDir, version string) error {
212 log.Printf("[INFO] building dgraph binary for version [%v]", version)

Callers 1

checkDgraphVersionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected