-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
57 lines (46 loc) · 1.08 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
51
52
53
54
55
56
57
RESCRIPT=yarn rescript
BSC=bsc
RETEST=yarn retest
EJS=yarn ejs
MKDOCS=mkdocs
ALL_RES=$(wildcard src/*.res*) $(wildcard tests/*.res*)
.PHONY: build
build:
$(RESCRIPT)
.PHONY: dev
dev:
$(RESCRIPT) -w
.PHONY: dev_docs
dev_docs:
$(MKDOCS) serve --dev-addr "localhost:8880"
.PHONY: test
test: build
$(RETEST) tests/*.bs.js
.PHONY: prettify
prettify:
$(RESCRIPT) format -all
.PHONY: bump_version
bump_version: test prettify
@echo -n "Is CHANGELOG.md actual? [y/N] " && \
read CHANGELOG_ACTUAL && \
[ $${CHANGELOG_ACTUAL:-N} = y ] || \
(echo "Update CHANGELOG.md, commit, then try again" && exit 1)
@echo -n "Which semver component to bump? [major/minor/patch] " && \
read VERSION_TO_BUMP && \
npm version $${VERSION_TO_BUMP} --message "chore: bump version to %s"
@echo "Version bumped. Now run:"
@echo ""
@echo "make publish"
@echo ""
.PHONY: publish
publish:
git push
git push --tags
npm publish
$(MKDOCS) gh-deploy
.PHONY: objectn.res
objectn.res:
$(EJS) ./templates/objectN.res.ejs
.PHONY: objectn.resi
objectn.resi:
$(EJS) ./templates/objectN.resi.ejs