forked from changkun/occamy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 766 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
# Copyright 2019 Changkun Ou. All rights reserved.
# Use of this source code is governed by a MIT
# license that can be found in the LICENSE file.
VERSION = $(shell git describe --always --tags)
BUILD = $(shell date +%F)
GOPATH=$(shell go env GOPATH)
HOME = github.com/changkun/occamy
IMAGE = occamy
build:
docker build -t $(IMAGE):$(VERSION) -t $(IMAGE):latest -f docker/Dockerfile .
.PHONY: occamy
run:
cd docker && docker-compose up
stop:
cd docker && docker-compose down
test:
go test -cover -coverprofile=cover.test -v ./...
go tool cover -html=cover.test -o cover.html
clean:
docker images -f "dangling=true" -q | xargs docker rmi -f
docker image prune -f
# docker rm $(docker ps -a -q)
# docker rmi $(docker images | grep occamy)
.PHONY: clean