This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
65 lines (46 loc) · 1.57 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
64
65
SHELL := bash
DOCKER_TAG ?= latest
# Don't delete intermediary files we touch under .make,
# which are markers for things we have done.
# https://stackoverflow.com/questions/5426934/why-this-makefile-removes-my-goal
.SECONDARY:
bootstrap: .make/bootstrap
# Just alias for bootstrap
setup: .make/bootstrap
docker-build-all: \
docker-build/explorer \
docker-build/event-web-server \
docker-build/event-handler
docker-build/explorer: .make/docker-build/explorer
docker-build/event-web-server: .make/docker-build/event-web-server
docker-build/event-handler: .make/docker-build/event-handler
build-explorer: .make/npm/build-explorer
build-event-store: .make/npm/build-event-store
build-all: \
build-explorer
test:
yarn test
cd packages/event_store && npm test && cd -
# install all package
.make/bootstrap:
yarn bootstrap
.make/npm/build-explorer: .make/bootstrap
# CI=false so on Drone it won't fail on warnings (currently about href).
yarn run build
mkdir -p $(dir $@) && touch $@
.make/docker-build/explorer: build-explorer
docker build -t casperlabs/explorer:$(DOCKER_TAG) .
mkdir -p $(dir $@) && touch $@
.make/docker-build/event-web-server:
cd packages/event_store && \
docker build -t casperlabs/event-web-server:$(DOCKER_TAG) -f Dockerfile.web_server .
mkdir -p $(dir $@) && touch $@
.make/docker-build/event-handler:
cd packages/event_store && \
docker build -t casperlabs/event-handler:$(DOCKER_TAG) -f Dockerfile.handler .
mkdir -p $(dir $@) && touch $@
clean:
lerna clean -y || true
rm -rf node_modules
rm -rf packages/event_store/node_modules
rm -rf .make