// PublishGit packages a git repo as tar.gz and uploads it to gitbook.io func (b *Book) PublishGit(bookId, version, bookpath, ref string) error { tar, err := utils.GitTarGz(bookpath, ref) if err != nil { return err } defer tar.Close() return b.PublishStream(bookId, version, tar) }
// Git returns an io.ReadCloser of a repo as a tar.gz func Git(p, ref string) (io.ReadCloser, error) { return utils.GitTarGz(p, ref) }