Weighs the soul of incoming HTTP requests to stop AI crawlers
1VERSION= $(shell cat ./VERSION)
2GO?= go
3NPM?= npm
4
5.PHONY: build assets deps lint prebaked-build test
6
7all: build
8
9deps:
10 $(NPM) ci
11 $(GO) mod download
12
13assets: PATH:=$(PWD)/node_modules/.bin:$(PATH)
14assets: deps
15 $(GO) generate ./...
16 ./web/build.sh
17 ./xess/build.sh
18
19build: assets
20 $(GO) build -o ./var/anubis ./cmd/anubis
21 @echo "Anubis is now built to ./var/anubis"
22
23lint: assets
24 $(GO) vet ./...
25 $(GO) tool staticcheck ./...
26
27prebaked-build:
28 $(GO) build -o ./var/anubis -ldflags "-X 'github.com/TecharoHQ/anubis.Version=$(VERSION)'" ./cmd/anubis
29
30test: assets
31 $(GO) test ./...