Exemple #1
0
func main() {
	flag.Parse()
	if len(flag.Args()) != 1 {
		log.Fatal("Need 1 arg: builder name")
	}
	bldr := builder.New(flag.Arg(0), *root, *addr)

	cmd := exec.Command("bash", "cyclus-all.sh")
	bldr.AddCmd("build-all", cmd, true)

	cmd = exec.Command("bash", "cyc-test.sh")
	bldr.AddCmd("test-all", cmd, false)

	hashes, err := bldr.DoWork()
	if err != nil {
		log.Fatal(err)
	}

	log.Printf(" processed %v hashes:\n%v\n", len(hashes), hashes)
}
Exemple #2
0
func main() {
	if len(flag.Args()) != 1 {
		log.Fatal("Need 1 arg: builder name")
	}
	bldr := builder.New(flag.Arg(0), *root, *addr)

	cmd := exec.Command("git", "fetch", "origin")
	bldr.AddCmd("fetch", cmd, false)

	cmd = exec.Command("git", "checkout")
	bldr.AddCmd("checkout", cmd, true)

	cmd = exec.Command("go", "test", "./...")
	bldr.AddCmd("test-all", cmd, false)

	hashes, err := bldr.DoWork()
	if err != nil {
		log.Fatal(err)
	}

	log.Printf("processed %v hashes:\n%v\n", len(hashes), hashes)
}