Exemplo n.º 1
0
// 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)
}
Exemplo n.º 2
0
// 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)
}