forked from materya/eslint-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 816 Bytes
/
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
#!make
PM = npm
PRERELEASE_TAG ?= beta
PUBLISH_FLAGS = publish --access public
MODULES = node_modules
.PHONY: all
all:
@echo "Nothing to build"
$(MODULES):
$(PM) i
.PHONY: clean
clean:
rm -rf $(MODULES)
.PHONY: test
test:
$(PM) t
.PHONY: release
release:
ifneq (,$(findstring n,$(MAKEFLAGS)))
+$(PM) run release -- --dry-run
+$(PM) $(PUBLISH_FLAGS) --dry-run
else
$(PM) run release
git push --follow-tags origin master
$(PM) $(PUBLISH_FLAGS)
endif
.PHONY: prerelease
prerelease: $(DIST)
ifneq (,$(findstring n,$(MAKEFLAGS)))
+$(PM) run release -- --prerelease $(PRERELEASE_TAG) --dry-run
+$(PM) $(PUBLISH_FLAGS) --tag $(PRERELEASE_TAG) --dry-run
else
$(PM) run release -- --prerelease $(PRERELEASE_TAG)
git push --follow-tags origin master
$(PM) $(PUBLISH_FLAGS) --tag $(PRERELEASE_TAG)
endif