aboutsummaryrefslogtreecommitdiff
path: root/go/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-15 16:48:09 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:37 +0200
commitcab2152b6090f5edb383dc1fc3410487207e95d1 (patch)
tree0b89fb5484f44ebb7c0d49f7333707a1f9a9979c /go/Makefile
parenta8cc0c015d1c4814b1f0b285ed5e6985dd8f6772 (diff)
downloadmuhqs-game-cab2152b6090f5edb383dc1fc3410487207e95d1.tar.gz
muhqs-game-cab2152b6090f5edb383dc1fc3410487207e95d1.zip
load assets from muhq.space when using a release build
Diffstat (limited to 'go/Makefile')
-rw-r--r--go/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/go/Makefile b/go/Makefile
index 20ef58e9..cac5071e 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -8,9 +8,14 @@ WASM := client/client.wasm webtools/webtools.wasm dummy-ui/dummy-ui.wasm
GOFMT ?= gofumpt -l -w .
-.PHONY: all fmt test check $(OBJS) $(WASM)
+GO_BUILDTAGS ?=
+
+.PHONY: all release fmt test check $(OBJS) $(WASM)
all: $(OBJS) $(WASM)
+release:
+ $(MAKE) GO_BUILDTAGS="-tags release" all
+
.PHONY: client server dummy-ui
client: client/client
server: server/server
@@ -18,11 +23,11 @@ dummy-ui: dummy-ui/dummy-ui
$(OBJS):
@echo Building $(@F)
- @pushd $(@D) >/dev/null && go build && popd >/dev/null
+ @pushd $(@D) >/dev/null && go build $(GO_BUILDTAGS) && popd >/dev/null
$(WASM):
@echo Building $(@F) ...
- @pushd $(@D) >/dev/null && env GOOS=js GOARCH=wasm go build -o $(@F) && popd >/dev/null
+ @pushd $(@D) >/dev/null && env GOOS=js GOARCH=wasm go build $(GO_BUILDTAGS) -o $(@F) && popd >/dev/null
fmt:
@set -e; for package in $(PACKAGES) webtools; do \