Skip to content

Commit

Permalink
Update instructions for including the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
josephburnett committed Feb 24, 2024
1 parent a2d4783 commit cf8d025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fuzz :
pack-web : build-web
go run web/pack/main.go

build-web :
build-web : check-goroot
cp $$GOROOT/misc/wasm/wasm_exec.js web/assets/
GOOS=js GOARCH=wasm go build -o web/assets/jd.wasm ./web/ui/main.go

Expand Down Expand Up @@ -82,6 +82,11 @@ ifndef JD_PREVIOUS_VERSION
$(error Set JD_PREVIOUS_VERSION for release notes)
endif

check-goroot:
ifndef GOROOT
$(error Set GOROOT in order to file wasm_exec.js)
endif

find-issues :
-staticcheck ./...
-goreportcard-cli -v ./...
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const (

func serveWeb(port string) error {
if serve.Handle == nil {
return fmt.Errorf("the web UI wasn't include in this build: use `make release` to include it")
return fmt.Errorf("the web UI wasn't include in this build: use `make build` to include it")
}
http.HandleFunc("/", serve.Handle)
log.Printf("Listening on http://localhost:%v...", port)
Expand Down

0 comments on commit cf8d025

Please sign in to comment.