nuke/Makefile
fucksophie 02b9aebbe5
Some checks failed
Docker image builds / build (push) Failing after 4m22s
NUKE
2026-02-07 14:27:38 +02:00

34 lines
770 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/nuke ./cmd/nuke
$(GO) build -o ./var/robots2policy ./cmd/robots2policy
@echo "nuke is now built to ./var/nuke"
lint: assets
$(GO) vet ./...
$(GO) tool staticcheck ./...
$(GO) tool govulncheck ./...
prebaked-build:
$(GO) build -o ./var/nuke -ldflags "-X 'git.sad.ovh/sophie/nuke.Version=$(VERSION)'" ./cmd/nuke
$(GO) build -o ./var/robots2policy -ldflags "-X 'git.sad.ovh/sophie/nuke.Version=$(VERSION)'" ./cmd/robots2policy
test: assets
$(GO) test ./...