-
Notifications
You must be signed in to change notification settings - Fork 129
/
Makefile
50 lines (36 loc) · 1.06 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
TEST_FOLDER ?= ./test/
TEST_FILES ?= *.test.js
REPORTER = spec
TIMEOUT = 20000
MOCHA = ./node_modules/mocha/bin/_mocha
PATH := ./node_modules/.bin:$(PATH)
SHELL := /bin/bash
lint:
@npm run lint
validate-lint:
@npm run validate-lint
integration-test:
@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep ^Integration::
unit-test:
@mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES) --grep '^(?!Integration::).*'
test: lint unit-test
test-cov:
@nyc --reporter=html --reporter=text mocha $(TEST_FOLDER) -t $(TIMEOUT) -R spec --recursive -name $(TEST_FILES)
test-coveralls:
@nyc mocha -t $(TIMEOUT) -R spec $(TESTS)
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@nyc report --reporter=text-lcov | coveralls
clean:
@rm -rf output
build:
tsc -p ./
postbuild:
copyfiles -a -u 1 -e "**/*.{js,ts}" "src/**/*" ./
chmod +x bin/*.js
binary: clean package-fun-nas-server
@script/binary.sh
package-fun-nas-server:
make -C ./lib/utils/fun-nas-server package
upload:
@script/upload.sh
.PHONY: test clean binary build postbuild