2021-03-28 17:13:46 +00:00
|
|
|
# Go parameters
|
|
|
|
GOCMD=go
|
|
|
|
GOBUILD=$(GOCMD) build
|
|
|
|
GOMOD=$(GOCMD) mod
|
|
|
|
GOTEST=$(GOCMD) test
|
|
|
|
GOGET=$(GOCMD) get
|
|
|
|
|
|
|
|
all: build
|
|
|
|
build:
|
2021-09-15 12:18:33 +00:00
|
|
|
$(GOBUILD) -v -ldflags="-extldflags=-static" -o "nuclei" cmd/nuclei/main.go
|
2021-08-03 17:03:50 +00:00
|
|
|
docs:
|
2021-09-15 12:18:33 +00:00
|
|
|
if ! which dstdocgen > /dev/null; then
|
|
|
|
echo -e "Command not found! Install? (y/n) \c"
|
|
|
|
go get -v github.com/projectdiscovery/yamldoc-go/cmd/docgen/dstdocgen
|
|
|
|
fi
|
|
|
|
$(GOCMD) generate pkg/templates/templates.go
|
|
|
|
$(GOBUILD) -o "cmd/docgen/docgen" cmd/docgen/docgen.go
|
|
|
|
./cmd/docgen/docgen docs.md nuclei-jsonschema.json
|
|
|
|
test:
|
|
|
|
$(GOTEST) -v ./...
|
2021-11-24 17:10:17 +00:00
|
|
|
integration:
|
|
|
|
bash ../integration_tests/run.sh
|
|
|
|
functional:
|
|
|
|
bash cmd/functional-tests/run.sh
|
2021-03-28 17:13:46 +00:00
|
|
|
tidy:
|
2021-09-15 12:18:33 +00:00
|
|
|
$(GOMOD) tidy
|