SIGN IN SIGN UP
reasonml / reason UNCLAIMED

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems

0 0 0 OCaml
2016-02-19 16:36:03 -08:00
# Portions Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
2016-05-22 01:23:48 +03:00
SHELL=bash -o pipefail
default: build
2017-10-30 22:40:16 -07:00
build:
dune build
2016-02-19 16:36:03 -08:00
install:
opam pin add reason . -y
2017-11-01 14:50:32 -07:00
# CI uses opam. Regular workflow needn't.
test-ci: install test
2017-10-30 22:40:16 -07:00
test: build clean-tests
dune build src/reason-parser-tests/testOprint.exe
# ./miscTests/rtopIntegrationTest.sh
./miscTests/jsxPpxTest.sh
2016-02-19 16:36:03 -08:00
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 -rf ./formatTest/**/intf_output
rm -rf ./formatTest/**/**/TestTest.cmi
rm -f ./formatTest/failed_tests
rm -f ./miscTests/reactjs_jsx_ppx_tests/*.cm*
testFormat: build clean-tests
cd formatTest; ./test.sh
all_errors:
@ echo "Regenerate all the possible error states for Menhir."
@ echo "Warning: This will take a while and use a lot of CPU and memory."
@ echo "---"
menhir --explain --strict --unused-tokens src/reason-parser/reason_parser.mly --list-errors > src/reason-parser/reason_parser.messages.checked-in
clean: clean-tests
dune clean
clean-for-ci: clean-tests
rm -rf ./_build
2016-02-19 16:36:03 -08:00
.PHONY: build clean
2016-02-19 16:36:03 -08:00
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SUBSTS:=$(ROOT_DIR)/pkg/substs
2018-01-25 01:11:18 -08:00
# For publishing esy releases to npm
esy-prepublish: build clean-tests pre_release
2018-01-25 01:11:18 -08:00
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
2018-01-25 01:11:18 -08:00
# For OPAM
release_check:
2017-02-27 10:00:06 -08:00
./scripts/release-check.sh
2018-01-25 01:11:18 -08:00
# For OPAM
release: release_check pre_release
2017-11-27 14:01:28 -08:00
git add package.json src/refmt/package.ml reason.opam
git commit -m "Version $(version)"
git tag -a $(version) -m "Version $(version)."
2017-03-28 11:45:57 -07:00
# 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)
2016-10-16 11:12:24 -07:00
git clean -fdx
./scripts/opam-release.sh
2016-02-19 16:36:03 -08:00
.PHONY: release
all-supported-ocaml-versions:
# the --dev flag has been omitted here but should be re-introduced eventually
dune build @install @runtest --root .
.PHONY: all-supported-ocaml-versions