-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.12 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.12 KB
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
PROJECTNAME=mesos-executor
VERSION=$(shell git tag | sort -Vr | head -n 1)
.PHONY: all
all: build
.PHONY: deb
deb: build
mkdir -p ./$(PROJECTNAME)-deb/usr/sbin/
mkdir -p ./$(PROJECTNAME)-deb/etc/mesos-executor/
mkdir -p ./$(PROJECTNAME)-deb/DEBIAN
chmod 0755 ./$(PROJECTNAME)-deb/DEBIAN
cp ./config.yaml ./$(PROJECTNAME)-deb/etc/mesos-executor/
cp ./go-mesos-executor ./$(PROJECTNAME)-deb/usr/sbin/mesos-container-executor
printf "Package: mesos-executor\nMaintainer: Debian <docker@ml.ovh.net>\nVersion: $(VERSION)\nPriority: optional\nArchitecture: amd64\nSection: misc\nDepends: libc6\nDescription: Allow mesos to create docker containers\n" > $(PROJECTNAME)-deb/DEBIAN/control
dpkg-deb --build $(PROJECTNAME)-deb .
rm -rf ./$(PROJECTNAME)-deb
.PHONY: build
build:
go build
.PHONY: race
race:
go build -race
.PHONY: test
test:
go test ./...
.PHONY: testv
testv:
go test -v ./...
.PHONY: docker
docker: build
docker-compose build
docker-compose up
.PHONY: clean
clean:
docker-compose stop -t 0
docker-compose rm -f
.PHONY: redocker
redocker: clean docker
.PHONY: lint
lint:
gometalinter ./... --config=.gometalinter.json