func getBuildID()

in getdeps/main.go [124:143]


func getBuildID(configFile string, cwd string) string {
	// If running under Buck, use its working dir at the time of build invocation.
	if val, ok := os.LookupEnv("BUCK_CLIENT_PWD"); ok {
		if id, err := identifyRepo(val); err != nil {
			return id
		}
	}
	// Next, try directory of the config.
	if absConfigFilePath, err := filepath.Abs(configFile); err == nil {
		if id, err := identifyRepo(filepath.Dir(absConfigFilePath)); err == nil {
			return id
		}
	}
	// Finally, try CWD.
	if id, err := identifyRepo(cwd); err == nil {
		return id
	}
	// Give up.
	return "???"
}