-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Makefile
41 lines (32 loc) · 797 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.DEFAULT_GOAL := linux
.PHONY: linux
linux:
go build -o ./gobuster
.PHONY: windows
windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o ./gobuster.exe
.PHONY: fmt
fmt:
go fmt ./...
.PHONY: update
update:
go get -u
go mod tidy -v
.PHONY: all
all: fmt update linux windows test lint
.PHONY: test
test:
go test -v -race ./...
.PHONY: lint
lint:
"$$(go env GOPATH)/bin/golangci-lint" run ./...
go mod tidy
.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
.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}"