-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
42 lines (30 loc) · 1011 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
32
33
34
35
36
37
38
39
40
41
SHELL := /bin/bash
BUILD_ID := build-$(shell date +'%s')
BUILD_BASEDIR=../engine.js-builds
BUILD_DIR = $(BUILD_BASEDIR)/$(BUILD_ID)
MKDIR = mkdir -p
NODE_VERSION ?= v0.6.15
GOTO_BUILD_DIR = cd $(BUILD_DIR); source ~/.nvm/nvm.sh; nvm use $(NODE_VERSION);
GOTO_MODULE_DIR = cd node_modules/engine.js;
RUN_LOCAL_SPEC = `npm bin`/jasmine-node --forceexit --captureExceptions
all: test
test: unit-test end-to-end-test
build: deploy verify-deploy run-perf
deploy-and-test: deploy verify-deploy
perf: deploy run-perf
unit-test:
$(RUN_LOCAL_SPEC) spec/engine/
end-to-end-test:
$(RUN_LOCAL_SPEC) spec/end-to-end/
verify-deploy:
$(GOTO_BUILD_DIR) $(GOTO_MODULE_DIR) $(RUN_LOCAL_SPEC) spec/engine
$(GOTO_BUILD_DIR) $(GOTO_MODULE_DIR) $(RUN_LOCAL_SPEC) spec/end-to-end
deploy:
$(MKDIR) $(BUILD_DIR)
$(MKDIR) $(BUILD_DIR)/node_modules
$(GOTO_BUILD_DIR) npm install ../../engine.js
clean:
rm -rf $(BUILD_BASEDIR)
rm -f *.ipc
run-perf:
$(GOTO_BUILD_DIR) $(GOTO_MODULE_DIR) $(RUN_LOCAL_SPEC) spec/load