add a Makefile (#191)

* add a Makefile

Based on advice from IRC, a makefile helps downstream packagers
understand how to build the software.

Signed-off-by: Xe Iaso <me@xeiaso.net>

* Apply review suggestions

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-04-02 19:57:28 -04:00 committed by GitHub
parent 573dfd099f
commit 266d8c0cc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 34 additions and 4 deletions

25
Makefile Normal file
View file

@ -0,0 +1,25 @@
NODE_MODULES = node_modules
.PHONY: build assets deps lint test
$(NODE_MODULES):
npm run assets
assets: $(NODE_MODULES)
deps: assets
npm ci
go mod download
build: deps
npm run build
@echo "Anubis is now built to ./var/anubis"
all: build
lint:
go vet ./...
staticcheck ./...
test:
npm run test