Skip to content

Commit 0183364

Browse files
committed
fix(cli): commit built webapp/dist so go:embed build passes in CI
A stray `pkg/cli/webapp/dist/` line in .gitignore re-ignored the directory after the negations meant to keep it tracked (last-match-wins), so nothing under dist was committed. CI's `go build ./cmd/captain` then failed with `pattern all:webapp/dist: no matching files found`, which also broke the test and lint jobs' compilation. The webapp can't be built in CI or the goreleaser release job (its vite build uses a local clicky-ui link: dependency), so the built dist must be committed and embedded. Remove the contradictory ignore line, commit the production dist, and correct serve.go's stale comment.
1 parent fa146f4 commit 0183364

148 files changed

Lines changed: 924 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ pkg/cli/webapp/*.tsbuildinfo
2020
!pkg/cli/webapp/dist/
2121
!pkg/cli/webapp/dist/**
2222
.grite/
23-
pkg/cli/webapp/dist/
2423
hack/

pkg/cli/serve.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ import (
2626
"github.com/spf13/cobra"
2727
)
2828

29-
// all: keeps the committed dist/.gitkeep placeholder in the embed so the binary
30-
// compiles without a built webapp (dist is gitignored and built on demand or in
31-
// the release workflow). When index.html is absent, serve.go reports it at runtime.
29+
// The built webapp is committed under webapp/dist (see .gitignore) because the
30+
// vite build depends on a local clicky-ui link: dependency that is unavailable
31+
// in CI and in the goreleaser release job, so the binary embeds the checked-in
32+
// dist rather than building it. all: ensures dotfiles are embedded too. When
33+
// index.html is absent, serve.go reports it at runtime.
3234
//
3335
//go:embed all:webapp/dist
3436
var captainWebappFS embed.FS

pkg/cli/webapp/dist/assets/FixtureFrontmatterDialog-DBdNoV8I.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/apl-B4CMkyY2.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/asciiarmor-Df11BRmG.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/asn1-EdZsLKOL.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/asterisk-B-8jnY81.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/bash-atvbtKCR.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/brainfuck-C4LP7Hcl.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/cli/webapp/dist/assets/clike-B9uivgTg.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)