-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 945 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
.PHONY: test
ALL_SOURCES_AND_ASSETS := $(shell find src/ assets/metadata/ assets/indexes/ config.json)
GIT_SHA := $(shell git rev-parse --short HEAD)
download-images-and-metadata:
node src/js/util/download_all.js
index-images:
node src/js/util/index_images.js
clean:
rm -r build/ || true
build: $(ALL_SOURCES_AND_ASSETS)
node src/js/build/build.js | tee build.log
@# fail if some files were not located by the copy-webpack-plugin
@! grep -q 'unable to locate' build.log || (rm -r build/; exit 1)
@echo 'Build done: build/'
test:
yarn test --recursive test/unit/
test-watch:
yarn test-watch
integration-test: build
yarn test --recursive test/integration/
git-check-uncommitted:
git diff-index --quiet HEAD -- || (echo 'Uncommitted changes - aborting'; exit 1)
package: git-check-uncommitted test integration-test build
zip -FS magic-card-zoom-$(GIT_SHA).zip -r build/
@echo 'Packaging done: magic-card-zoom-$(GIT_SHA).zip'