Skip to content

Commit 37841ee

Browse files
committed
Makefile
1 parent 3a5be14 commit 37841ee

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

Makefile

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.PHONY: build
2+
build: bin/moon
3+
4+
.PHONY: spec
5+
spec:
6+
crystal spec --error-on-warnings --error-trace --progress
7+
8+
.PHONY: spec-cli
9+
spec-cli: build
10+
crystal spec spec_cli/*_spec.cr spec_cli/**/*_spec.cr --error-on-warnings --error-trace --progress
11+
12+
.PHONY: format
13+
format:
14+
crystal tool format
15+
16+
.PHONY: format-core
17+
format-core: build
18+
cd core && ../bin/moon format
19+
cd core/tests && ../../bin/moon format
20+
21+
.PHONY: ameba
22+
ameba:
23+
bin/ameba
24+
25+
.PHONY: test
26+
test: spec ameba
27+
28+
.PHONY: test-core
29+
test-core: build
30+
cd core/tests && ../../bin/moon test -b chrome
31+
32+
.PHONY: development
33+
development: build
34+
mv bin/moon ~/.bin/moon-dev
35+
36+
.PHONY: local
37+
local: build
38+
mv bin/moon ~/.bin/moon
39+
40+
.PHONY: documentation
41+
documentation:
42+
rm -rf docs && crystal docs
43+
44+
.PHONY: development-release
45+
development-release:
46+
docker-compose run --rm app \
47+
crystal build src/moon.cr -o moon-dev --static --no-debug --release
48+
mv ./moon-dev ~/.bin/
49+
50+
src/assets/runtime.js: \
51+
$(shell find runtime/src -type f) \
52+
runtime/index.js
53+
cd runtime && make index
54+
55+
src/assets/runtime_test.js: \
56+
$(shell find runtime/src -type f) \
57+
runtime/index_testing.js \
58+
runtime/index.js
59+
cd runtime && make index_testing
60+
61+
# This builds the binary and depends on files in some directories.
62+
bin/moon: \
63+
$(shell find core/source -type f) \
64+
$(shell find runtime/src -type f) \
65+
$(shell find src -type f) \
66+
src/assets/runtime_test.js \
67+
src/assets/runtime.js
68+
shards build --error-on-warnings --error-trace --progress

0 commit comments

Comments
 (0)