mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-10-28 09:44:55 +00:00
* chore(lib/challenge): generecize challenge JS bootstrap logic Assisted-by: Claude Opus 5 via Claude Code Signed-off-by: Xe Iaso <me@xeiaso.net> * test(internal/test): test webassembly methods Signed-off-by: Xe Iaso <me@xeiaso.net> * chore(Makefile): build wasm Signed-off-by: Xe Iaso <me@xeiaso.net> * chore: spelling Signed-off-by: Xe Iaso <me@xeiaso.net> * fix(web/js): vastly deduplicate worker spawning code Signed-off-by: Xe Iaso <me@xeiaso.net> * docs: update CHANGELOG Signed-off-by: Xe Iaso <me@xeiaso.net> --------- Signed-off-by: Xe Iaso <me@xeiaso.net> Signed-off-by: Xe Iaso <xe.iaso@techaro.lol>
36 lines
834 B
Makefile
36 lines
834 B
Makefile
VERSION= $(shell cat ./VERSION)
|
|
GO?= go
|
|
NPM?= npm
|
|
|
|
.PHONY: build assets deps lint prebaked-build test
|
|
|
|
all: build
|
|
|
|
deps:
|
|
$(NPM) ci
|
|
$(GO) mod download
|
|
|
|
assets: PATH:=$(PWD)/node_modules/.bin:$(PATH)
|
|
assets: deps
|
|
$(GO) generate ./...
|
|
bash ./wasm/scripts/build_wasm.sh
|
|
bash ./wasm/scripts/build_wasm2js.sh
|
|
./web/build.sh
|
|
./xess/build.sh
|
|
|
|
build: assets
|
|
$(GO) build -o ./var/anubis ./cmd/anubis
|
|
$(GO) build -o ./var/robots2policy ./cmd/robots2policy
|
|
@echo "Anubis is now built to ./var/anubis"
|
|
|
|
lint: assets
|
|
$(GO) vet ./...
|
|
$(GO) tool staticcheck ./...
|
|
|
|
prebaked-build:
|
|
$(GO) build -o ./var/anubis -ldflags "-X 'github.com/TecharoHQ/anubis.Version=$(VERSION)'" ./cmd/anubis
|
|
$(GO) build -o ./var/robots2policy -ldflags "-X 'github.com/TecharoHQ/anubis.Version=$(VERSION)'" ./cmd/robots2policy
|
|
|
|
test: assets
|
|
$(GO) test ./...
|