Skip to content

Commit

Permalink
Makefile: add wasm target, remove server
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Apr 29, 2024
1 parent 08352f0 commit 1cd88b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build
run: GOOS=js GOARCH=wasm go build -ldflags="-s -w" -o static/main.wasm ./cmd/wholesale
run: make wasm
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
WHOLESALE_WASM = static/wholesale.wasm

wasm: $(WHOLESALE_WASM)

wholesale:
go build -o $@

$(WHOLESALE_WASM):
GOOS=js GOARCH=wasm go build -o $@

server: $(WHOLESALE_WASM)
go build ./cmd/server

run: server
./server
clean:
rm -f wholesale $(WHOLESALE_WASM)

.PHONY: wholesale run server $(WHOLESALE_WASM)
.PHONY: wholesale wasm clean

0 comments on commit 1cd88b5

Please sign in to comment.