forked from chenglou/reason
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (67 loc) · 2.19 KB
/
Makefile
File metadata and controls
88 lines (67 loc) · 2.19 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Portions Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
SHELL=bash -o pipefail
default: build
build:
jbuilder build
install:
opam pin add reason . -y
# CI uses opam. Regular workflow needn't.
test-ci: install test
test: build clean-tests
node ./formatTest/testOprint.js
./miscTests/rtopIntegrationTest.sh
./miscTests/jsxPpxTest.sh
cd formatTest; ./test.sh
.PHONY: coverage
coverage:
find -iname "bisect*.out" -exec rm {} \;
make test
bisect-ppx-report -ignore-missing-files -I _build/ -html coverage-after/ bisect*.out ./*/*/*/bisect*.out
find -iname "bisect*.out" -exec rm {} \;
clean-tests:
rm -rf ./formatTest/**/actual_output
rm -f ./formatTest/failed_tests
rm -f ./miscTests/reactjs_jsx_ppx_tests/*.cm*
testFormat: build clean-tests
cd formatTest; ./test.sh
# Not all versions of jbuilder have the clean command.
# jbuilder clean
clean: clean-tests
jbuilder clean
# The jbuilder that gets installed on CI doesn't have the make clean
# command yet.
clean-for-ci: clean-tests
rm -rf ./_build
.PHONY: build clean
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SUBSTS:=$(ROOT_DIR)/pkg/substs
# For publishing esy releases to npm
esy-prepublish: build clean-tests
node ./scripts/esy-prepublish.js
# For OPAM
pre_release:
ifndef version
$(error environment variable 'version' is undefined)
endif
export git_version="$(shell git rev-parse --verify HEAD)"; \
export git_short_version="$(shell git rev-parse --short HEAD)"; \
$(SUBSTS) $(ROOT_DIR)/src/refmt/package.ml.in
.PHONY: pre_release
# For OPAM
release_check:
./scripts/release-check.sh
# For OPAM
release: release_check pre_release
git add package.json src/refmt/package.ml reason.opam
git commit -m "Version $(version)"
git tag -a $(version) -m "Version $(version)."
# Push first the objects, then the tag.
git push "git@github.com:facebook/Reason.git"
git push "git@github.com:facebook/Reason.git" tag $(version)
git clean -fdx
./scripts/opam-release.sh
.PHONY: release
all-supported-ocaml-versions:
# the --dev flag has been omitted here but should be re-introduced eventually
jbuilder build @install @runtest --workspace jbuild-workspace.dev --root .
.PHONY: all-supported-ocaml-versions