-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
54 lines (41 loc) · 1.42 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
# ref https://gist.github.com/inhere/c98df2b096ee3ccc3d36ec61923c9fc9
.DEFAULT_GOAL := help
.PHONY: all update help addrmt fpush release
##There are some make command for the project
##
TAG=$(tag)
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | sed -e 's/: / /'
##Available Commands:
update: ## Update current project code to latest by git pull
update:
git checkout . && git pull
installcli: ## Install the swoft releasecli tool from github
installcli:
cd ~
git clone https://github.com/swoftlabs/swoft-releasecli
cd swoft-releasecli; \
ln -s $PWD/bin/releasecli /usr/local/bin/releasecli; \
chmod a+x bin/releasecli
updatecli: ## Update the swoft releasecli tool from github
updatecli:
cd ~/swoft-releasecli; \
git pull; \
chmod a+x bin/releasecli
addrmt: ## Add the remote repository address of each component to the local remote
addrmt: update
releasecli git:addrmt --all
fpush: ## Push all update to remote sub-repo by git push with '--force'
fpush: update
releasecli git:fpush --all
release: ## Release all sub-repo to new tag version and push to remote repo. eg: tag=v2.0.3
release:
releasecli tag:release --all -y -t $(TAG)
sami: ## Gen classes docs by sami.phar
classdoc:
# rm -rf docs/classes-docs
rm -rf docs/classes-docs
# gen docs
php sami.phar update ./script/sami.doc.inc
all: ## Run update, addrmt, fpush and release
all: update addrmt fpush release