2022-10-08 18:41:25 +02:00
|
|
|
.DEFAULT_GOAL := linux
|
2018-08-28 01:46:11 +02:00
|
|
|
|
2022-10-08 18:41:25 +02:00
|
|
|
.PHONY: linux
|
|
|
|
linux:
|
|
|
|
go build -o ./gobuster
|
|
|
|
|
|
|
|
.PHONY: windows
|
|
|
|
windows:
|
|
|
|
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o ./gobuster.exe
|
2018-08-28 02:41:32 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: fmt
|
2019-05-17 13:42:33 +02:00
|
|
|
fmt:
|
2022-10-08 18:41:25 +02:00
|
|
|
go fmt ./...
|
2019-05-17 13:42:33 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: update
|
2018-12-11 22:00:12 +01:00
|
|
|
update:
|
2022-10-08 18:41:25 +02:00
|
|
|
go get -u
|
|
|
|
go mod tidy -v
|
2018-08-28 02:41:32 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: all
|
2022-10-08 18:41:25 +02:00
|
|
|
all: fmt update linux windows test lint
|
2018-08-28 02:41:32 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: test
|
2018-08-28 01:46:11 +02:00
|
|
|
test:
|
2022-10-08 18:41:25 +02:00
|
|
|
go test -v -race ./...
|
2018-08-28 01:46:11 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: lint
|
2019-05-17 17:23:20 +02:00
|
|
|
lint:
|
2020-05-08 10:59:45 +02:00
|
|
|
"$$(go env GOPATH)/bin/golangci-lint" run ./...
|
|
|
|
go mod tidy
|
2019-05-17 17:23:20 +02:00
|
|
|
|
2021-02-25 00:35:51 +01:00
|
|
|
.PHONY: lint-update
|
|
|
|
lint-update:
|
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin
|
|
|
|
$$(go env GOPATH)/bin/golangci-lint --version
|
2022-10-08 18:51:28 +02:00
|
|
|
|
|
|
|
.PHONY: tag
|
|
|
|
tag:
|
|
|
|
@[ "${TAG}" ] && echo "Tagging a new version ${TAG}" || ( echo "TAG is not set"; exit 1 )
|
|
|
|
git tag -a "${TAG}" -m "${TAG}"
|
|
|
|
git push origin "${TAG}"
|