mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 09:48:08 -04:00

* Makefile: Build robots2policy * Update metadata check-spelling run (pull_request) for build-robots2policy Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev> --------- Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> Co-authored-by: Jason Cameron <git@jasoncameron.dev>
35 lines
790 B
Makefile
35 lines
790 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 ./...
|
|
./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 ./...
|
|
$(GO) tool govulncheck ./...
|
|
|
|
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 ./...
|