コード例 #1
0
ファイル: convox.go プロジェクト: goodeggs/platform
func finishBuild(client *client.Client, appName string, build *client.Build) (string, error) {

	if build.Id == "" {
		return "", fmt.Errorf("unable to fetch build id")
	}

	if Verbose {
		reader, writer := io.Pipe()
		go io.Copy(os.Stdout, reader)
		if err := client.StreamBuildLogs(appName, build.Id, writer); err != nil {
			return "", err
		}
	}

	return waitForBuild(client, appName, build.Id)
}