forked from iron-io/functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.02 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
# Just builds
DIR := ${CURDIR}
dep:
glide install --strip-vendor
build:
go build -o functions
build-docker:
set -ex
docker run --rm -v $(DIR):/go/src/github.com/iron-io/functions -w /go/src/github.com/iron-io/functions iron/go:dev go build -o functions-alpine
docker build -t iron/functions:latest .
test:
go test -v $(shell go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fnctl)
cd fnctl && $(MAKE) test
test-datastore:
cd api/datastore && go test -v
test-docker:
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(DIR):/go/src/github.com/iron-io/functions \
-w /go/src/github.com/iron-io/functions iron/go:dev go test \
-v $(shell go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fnctl | grep -v datastore)
run:
./functions
run-docker: build-docker
set -ex
docker run --rm --privileged -it -e LOG_LEVEL=debug -e "DB_URL=bolt:///app/data/bolt.db" -v $(DIR)/data:/app/data -p 8080:8080 iron/functions
all: dep build