mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-10 10:38:45 +00:00
This is a breaking change because it makes Anubis rely on Go 1.25 ahead of #1525. I think that the change is worth it, but Fedora et.al updates slowly and I really don't want to rock the boat. One of the main reasons to do this is that this enables the ability to build Anubis on Windows (#1304). Signed-off-by: Xe Iaso <me@xeiaso.net>
32 lines
725 B
Makefile
32 lines
725 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
|
|
$(NPM) run assets
|
|
|
|
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 ./...
|