main
1package gitmal
2
3import (
4 "fmt"
5 "os"
6 "os/exec"
7)
8
9// Run executes the gitmal binary against a bare repo.
10func Run(repoPath, name, outputDir string) error {
11 cmd := exec.Command("gitmal", "--theme", "github-dark", "--name", name, "--output", outputDir, repoPath)
12 cmd.Stdout = os.Stdout
13 cmd.Stderr = os.Stderr
14
15 err := cmd.Run()
16 if err != nil {
17 return fmt.Errorf("running gitmal (repo=%s): %w", repoPath, err)
18 }
19 return nil
20}