This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
63 lines (56 loc) · 1.66 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
BEAT_NAME=pingbeat
BEAT_PATH=github.com/joshuar/pingbeat
BEAT_GOPATH=$(firstword $(subst :, ,${GOPATH}))
BEAT_URL=https://${BEAT_PATH}
SYSTEM_TESTS=false
TEST_ENVIRONMENT=false
ES_BEATS?=./vendor/github.com/elastic/beats
GOPACKAGES=$(shell glide novendor)
PREFIX?=.
NOTICE_FILE=NOTICE
GLIDE_VERSION=0.12.3
# Path to the libbeat Makefile
-include $(ES_BEATS)/libbeat/scripts/Makefile
# Initial beat setup
.PHONY: setup
setup: copy-vendor
make update
# Copy beats into vendor directory
.PHONY: copy-vendor
copy-vendor:
glide install
.PHONY: git-init
git-init:
git init
git add README.md CONTRIBUTING.md
git commit -m "Initial commit"
git add LICENSE
git commit -m "Add the LICENSE"
git add .gitignore
git commit -m "Add git settings"
git add .
git reset -- .travis.yml
git commit -m "Add pingbeat"
git add .travis.yml
git commit -m "Add Travis CI"
# This is called by the beats packer before building starts
.PHONY: before-build
before-build:
# Collects all dependencies and then calls update
.PHONY: collect
collect:
.PHONY: cross
cross:
test -d dist || mkdir dist
echo "Building Windows 32-bit..."
env GOOS=windows GOARCH=386 go build -o dist/pingbeat-windows-32.exe
echo "Building Windows 64-bit..."
env GOOS=windows GOARCH=amd64 go build -o dist/pingbeat-windows-64.exe
echo "Building Linux 32-bit..."
env GOOS=linux GOARCH=386 go build -o dist/pingbeat-linux-32.exe
echo "Building Linux 64-bit..."
env GOOS=linux GOARCH=amd64 go build -o dist/pingbeat-linux-64.exe
echo "Building OSX 32-bit..."
env GOOS=darwin GOARCH=386 go build -o dist/pingbeat-darwin-32.exe
echo "Building OSX 64-bit..."
env GOOS=darwin GOARCH=amd64 go build -o dist/pingbeat-darwin-64.exe