openquell/Makefile
Thomas von Dein 1d16fcb73f fixes:
- fixed bumpedge test for obstacles
- fixed obstacle crash when going to the south or east
- added wasm builder
2024-03-21 09:38:47 +01:00

27 lines
798 B
Makefile

version = $(shell egrep "version string = " config/static.go | cut -d'"' -f 2)
BRANCH = $(shell git branch --show-current)
COMMIT = $(shell git rev-parse --short=8 HEAD)
BUILD = $(shell date +%Y.%m.%d.%H%M%S)
#VERSION := $(if $(filter $(BRANCH), development),$(version)-$(BRANCH)-$(COMMIT)-$(BUILD),$(version))
VERSION := $(version)-$(BRANCH)-$(COMMIT)-$(BUILD)
SHORTVERSION := $(version)-$(BRANCH)-$(COMMIT)
LDFLAGS := -ldflags "-X 'openquell/config.VERSION=$(VERSION)'"
all: clean build
@echo ok
clean:
rm -f openquell
build:
go build -ldflags "-X 'openquell/config.VERSION=$(VERSION)'"
buildwasm:
env GOOS=js GOARCH=wasm go build -o openquell.wasm $(LDFLAGS) .
zipwasm:
zip -r openquell-$(SHORTVERSION).zip index.html openquell.wasm wasm_exec.js
test:
@echo $(VERSION)