File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,18 @@ func (m *Quarto) Container() *dagger.Container {
5656 return m .Ctr
5757}
5858
59+ // Build runs the quarto render command exporting to a directory
60+ func (m * Quarto ) Build (
61+ // source directory.
62+ source * dagger.Directory ,
63+ ) * dagger.Directory {
64+
65+ return m .Container ().
66+ WithDirectory ("/tmp" , source ).
67+ WithWorkdir ("/tmp" ).
68+ WithExec ([]string {"quarto" , "render" }).Directory ("/tmp/_book" )
69+ }
70+
5971// Render runs the quarto render command
6072func (m * Quarto ) Render (
6173 // source directory.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package main_test
33import (
44 "context"
55 "flag"
6- "fmt"
76 "os"
87 "testing"
98
@@ -50,9 +49,8 @@ func Test_Quarto(t *testing.T) {
5049 files , err := os .ReadDir (outputDir )
5150 require .NoError (t , err )
5251
53- fmt .Println (files )
5452 for _ , file := range files {
55- require .Regexp (t , `\.pdf\s* $` , file )
53+ require .Regexp (t , `\.pdf$` , file )
5654 }
5755
5856 err = os .RemoveAll (outputDir )
You can’t perform that action at this time.
0 commit comments