forked from maxonrow/mxw-sdk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (24 loc) · 960 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
ROOT_PATH := $(shell pwd)
REGISTRY_URL := registry-intl.ap-southeast-3.aliyuncs.com/d_mxw/
.PHONY:
all: release
version-major:
@npm --force -s --prefix $(ROOT_PATH) version major > /dev/null
version-minor:
@npm --force -s --prefix $(ROOT_PATH) version minor > /dev/null
version-patch:
@npm --force -s --prefix $(ROOT_PATH) version patch > /dev/null
version-prerelease:
@npm --force -s --prefix $(ROOT_PATH) version prerelease --preid=rc > /dev/null
version:
@echo $(shell node -p "require('$(ROOT_PATH)/package.json').name"):$(shell node -p "require('$(ROOT_PATH)/package.json').version")
build:
@npm run build
@REGISTRY_URL=$(REGISTRY_URL) make --no-print-directory -C $(ROOT_PATH)/docs build
release: version-patch
@npm run build
@REGISTRY_URL=$(REGISTRY_URL) make --no-print-directory -C $(ROOT_PATH)/docs release
publish:
@npm publish
release-docs:
@REGISTRY_URL=$(REGISTRY_URL) make --no-print-directory -C $(ROOT_PATH)/docs release