func init() {
	// we can search for it here.
	versions, err := FindVersions()
	if err != nil {
		panic(err)
	}

	module := &Module{
		versions: versions,
	}

	modules.RegisterModule("msbuild", module)
}
Exemple #2
0
func init() {
	// find the git client.
	if _, err := exec.LookPath("git"); err != nil {
		fmt.Errorf("No git: %s", err)
		return
	}

	args := []string{"version"}
	output, err := exec.Command("git", args...).CombinedOutput()
	if err != nil {
		fmt.Errorf("Error trying to use git: %s (%s)", err, output)
		return
	}

	r := regexp.MustCompile(`[\d.]+`)
	bytes := r.Find(output)

	mod := &Module{
		Version: string(bytes[:]),
	}
	fmt.Println("At git module")
	modules.RegisterModule("git", mod)
}
Exemple #3
0
func init() {
	modules.RegisterModule("docker", &Module{})
}