aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHenri Vasserman <henv@hot.ee>2025-04-12 05:00:48 +0300
committerGitHub <noreply@github.com>2025-04-11 22:00:48 -0400
commit20f1d40b61e12c7a104b5b81bba6dc9e2dfa1c7c (patch)
tree6d5680f7d43a846d066f1469044ebc321bc49df1 /Makefile
parent51bd058f2d845c0fe2204f202ad568ec2c76b6f7 (diff)
downloadanubis-20f1d40b61e12c7a104b5b81bba6dc9e2dfa1c7c.tar.xz
anubis-20f1d40b61e12c7a104b5b81bba6dc9e2dfa1c7c.zip
dev: Improvements to build scripts (#232)
* dev: make sure that stuff is building properly * chore: changelog * remove npx
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 20 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 9b8b61c..cb4d978 100644
--- a/Makefile
+++ b/Makefile
@@ -1,27 +1,31 @@
-NODE_MODULES = node_modules
-VERSION := $(shell cat ./VERSION)
+VERSION= $(shell cat ./VERSION)
+GO?= go
+NPM?= npm
.PHONY: build assets deps lint prebaked-build test
-assets:
- npm run assets
+all: build
deps:
- npm ci
- go mod download
+ $(NPM) ci
+ $(GO) mod download
-build: deps
- npm run build
- @echo "Anubis is now built to ./var/anubis"
+assets: PATH:=$(PWD)/node_modules/.bin:$(PATH)
+assets: deps
+ $(GO) generate ./...
+ ./web/build.sh
+ ./xess/build.sh
-all: build
+build: assets
+ $(GO) build -o ./var/anubis ./cmd/anubis
+ @echo "Anubis is now built to ./var/anubis"
-lint:
- go vet ./...
- go tool staticcheck ./...
+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/anubis -ldflags "-X 'github.com/TecharoHQ/anubis.Version=$(VERSION)'" ./cmd/anubis
-test:
- npm run test \ No newline at end of file
+test: assets
+ $(GO) test ./...