diff --git a/example/.sage/main.go b/example/.sage/main.go index 3ddd060c..6ee23ac7 100644 --- a/example/.sage/main.go +++ b/example/.sage/main.go @@ -4,6 +4,7 @@ import ( "context" "go.einride.tech/sage/sg" + "go.einride.tech/sage/tools/sgbackstage" "go.einride.tech/sage/tools/sgconvco" "go.einride.tech/sage/tools/sggit" "go.einride.tech/sage/tools/sggo" @@ -24,7 +25,8 @@ func main() { } func Default(ctx context.Context) error { - sg.Deps(ctx, ConvcoCheck, FormatMarkdown, FormatYaml) + sg.Deps(ctx, ConvcoCheck, BackstageValidate) + sg.Deps(ctx, FormatMarkdown, FormatYaml) sg.Deps(ctx, GoLint, GoReview) sg.Deps(ctx, GoTest) sg.Deps(ctx, GoModTidy) @@ -67,6 +69,11 @@ func FormatYaml(ctx context.Context) error { return sgyamlfmt.Run(ctx) } +func BackstageValidate(ctx context.Context) error { + sg.Logger(ctx).Println("validating Backstage files...") + return sgbackstage.Validate(ctx) +} + func ConvcoCheck(ctx context.Context) error { sg.Logger(ctx).Println("checking git commits...") return sgconvco.Command(ctx, "check", "origin/master..HEAD").Run()