-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
55 lines (45 loc) · 1.16 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
PATH := $(PWD)/node_modules/.bin:$(PATH)
export NODE_ENV
# Version of the latest git tag
VERSION = $(shell node -e "console.log(require('./lerna.json').version)")
# BEGIN-EVAL makefile-parser --make-help Makefile
help:
@echo ""
@echo " Targets"
@echo ""
@echo " bootstrap lerna bootstrap"
@echo " dist webpack all"
@echo " clean Remove built targets"
@echo " test Run unit tests"
@echo " link link"
@echo " publish publish packages"
@echo ""
@echo " Variables"
@echo ""
@echo " VERSION Version of the latest git tag"
# END-EVAL
# lerna bootstrap
bootstrap:
lerna bootstrap
# webpack all
dist:
lerna exec -- make -B dist
# Remove built targets
clean:
lerna exec -- make clean
# Run unit tests
.PHONY: test
test:
lerna exec make test
# link
link:
lerna exec -- npm link
# publish packages
publish:
lerna version --no-push --no-git-tag-version
VERSION=`node -e "console.log(require('./lerna.json').version)"`; \
$(MAKE) -B dist VERSION=$$VERSION NODE_ENV=production; \
git add lerna.json */dist */package*.json; \
git commit -m ":package: v$$VERSION"; \
git tag v$$VERSION; \
lerna exec npm publish