forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 770 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
BIN_PATH?=/usr/bin
CONF_PATH?=/etc/packetbeat
VERSION?=0.3.0
ARCH?=$(shell uname -m)
packetbeat: *.go
go build
.PHONY: install
install: packetbeat
install -D packetbeat $(DESTDIR)/$(BIN_PATH)/packetbeat
install -m 644 -D packetbeat.conf $(DESTDIR)/$(CONF_PATH)/packetbeat.conf
.PHONY: dist
dist: packetbeat
mkdir packetbeat-$(VERSION)
cp packetbeat packetbeat-$(VERSION)/
cp packetbeat.conf packetbeat-$(VERSION)/
tar czvf packetbeat-$(VERSION)-$(ARCH).tar.gz packetbeat-$(VERSION)
.PHONY: gofmt
gofmt:
gofmt -w -tabs=false -tabwidth=4 *.go
.PHONY: test
test:
go test -short
.PHONY: cover
cover:
go test -short -coverprofile=coverage.out
go tool cover -html=coverage.out
.PHONY: clean
clean:
rm packetbeat || true
rm -r packetbeat-$(VERSION) || true