-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
51 lines (40 loc) · 1.05 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
PREFIX := $(GOPATH)
BINDIR := $(PREFIX)/bin
SOURCE := src/*.go src/*/*.go src/*/*/*.go
all: fmt mohawk
mohawk: $(SOURCE)
go build -o mohawk src/*.go
.PHONY: fmt
fmt: $(SOURCE)
gofmt -s -l -w $(SOURCE)
.PHONY: lint
lint: $(SOURCE)
golint -min_confidence 0.9 src/...
.PHONY: clean
clean:
$(RM) mohawk
.PHONY: test
test:
@echo "running smoke tests"
bats test/mohawk.bats
.PHONY: test-unit
test-unit:
@echo "running unit tests"
@go test $(shell go list ./... | grep -v vendor)
.PHONY: secret
secret:
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.pem -days 3650 -subj /C=US/ST=name/O=comp
.PHONY: container
container:
# systemctl start docker
docker build -t yaacov/mohawk ./
docker tag yaacov/mohawk docker.io/yaacov/mohawk
# docker push docker.io/yaacov/mohawk
# docker run --name mohawk -e HAWKULAE_BACKEND="memory" -v $(readlink -f ./):/root/ssh:Z yaacov/mohawk
.PHONY: install
install: fmt mohawk
install -D -m0755 mohawk $(DESTDIR)$(BINDIR)/mohawk
.PHONY: vendor
vendor:
dep ensure