From fb560722ac2387e69793282e966d2af7508e604e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 05:24:08 +0000 Subject: [PATCH] fix(www): allow committing build artifacts and simplify embed directive - Updates `tavern/internal/www/.gitignore` to explicitly allow `build/` directory, ensuring build artifacts are committed and available for Go build. - Updates `tavern/internal/www/http.go` to use `//go:embed build` directive, recursively embedding the entire `build` directory. This is more robust than embedding specific file patterns and prevents build failures if file types change or are missing. - Resolves build error "pattern build/*.html: no matching files found". Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> --- tavern/internal/www/.gitignore | 3 +++ tavern/internal/www/http.go | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tavern/internal/www/.gitignore b/tavern/internal/www/.gitignore index 89967363f..1ec0246d1 100644 --- a/tavern/internal/www/.gitignore +++ b/tavern/internal/www/.gitignore @@ -18,3 +18,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +# Allow build files +!/build diff --git a/tavern/internal/www/http.go b/tavern/internal/www/http.go index d53c0899e..86215149a 100644 --- a/tavern/internal/www/http.go +++ b/tavern/internal/www/http.go @@ -15,9 +15,7 @@ type Handler struct { // Content embedded from the application's build directory, includes the latest build of the UI. // -//go:embed build/*.png build/*.html build/*.json build/*.txt build/*.ico -//go:embed build/static/* -//go:embed build/wasm/* +//go:embed build var Content embed.FS // ServeHTTP provides the Tavern UI, if the requested file does not exist it will serve index.html