mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:25:31 +00:00
* Add s3 bucket template provider - Refactor the custom github template code - add interface for template provider * Validate if aws creds are passed if bucket flag - refactor s3 provider struct to take client - add function which returns the aws s3 client - update error messages * Add aws s3 bucket flags documentation in README.md - Rename the github_test.go to customTemplate_test.go * go mod update * Move template provider code to pkg/external/customtemplates dir * Remove github and aws update variables from flag * Rename CustomTemplateProvider to Provider * Update integration and function command in makefile * Update github test case, accept token * readme update * go mod tidy * Update build-test.yml * handle empty dir in s3 * Add requested changes - download/update s3 and github only when `-ut` is passed - only print the missing env variable for s3 - add the custom templates path in ~/.config/nuclei/.template-config.json * print custom paths only if exists in config file * misc update * tag update Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com> Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
33 lines
825 B
Makefile
33 lines
825 B
Makefile
# Go parameters
|
|
GOCMD=go
|
|
GOBUILD=$(GOCMD) build
|
|
GOMOD=$(GOCMD) mod
|
|
GOTEST=$(GOCMD) test
|
|
GOFLAGS := -v
|
|
# This should be disabled if the binary uses pprof
|
|
LDFLAGS := -s -w
|
|
|
|
ifneq ($(shell go env GOOS),darwin)
|
|
LDFLAGS := -extldflags "-static"
|
|
endif
|
|
|
|
all: build
|
|
build:
|
|
$(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "nuclei" cmd/nuclei/main.go
|
|
docs:
|
|
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) $(GOFLAGS) ./...
|
|
integration:
|
|
cd ../integration_tests; bash run.sh
|
|
functional:
|
|
cd cmd/functional-test; bash run.sh
|
|
tidy:
|
|
$(GOMOD) tidy
|