Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions quarto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ func (m *Quarto) Container() *dagger.Container {
return m.Ctr
}

// Build runs the quarto render command exporting to a directory
func (m *Quarto) Build(
// source directory.
source *dagger.Directory,
) *dagger.Directory {

return m.Container().
WithDirectory("/tmp", source).
WithWorkdir("/tmp").
WithExec([]string{"quarto", "render"}).Directory("/tmp/_book")
}

// Render runs the quarto render command
func (m *Quarto) Render(
// source directory.
Expand Down
4 changes: 1 addition & 3 deletions quarto/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main_test
import (
"context"
"flag"
"fmt"
"os"
"testing"

Expand Down Expand Up @@ -50,9 +49,8 @@ func Test_Quarto(t *testing.T) {
files, err := os.ReadDir(outputDir)
require.NoError(t, err)

fmt.Println(files)
for _, file := range files {
require.Regexp(t, `\.pdf\s*$`, file)
require.Regexp(t, `\.pdf$`, file)
}

err = os.RemoveAll(outputDir)
Expand Down
Loading