forked from mariahyang/xui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
129 lines (99 loc) · 2.44 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
HASH=$(shell git rev-parse HEAD | cut -b 1-8)
PLUGINS := $(wildcard jsapp/plugins/*)
all:
cd jsapp && make
githash:
cd jsapp && make githash
watch:
cd jsapp && make watch
webuild:
cd jsapp && make webuild
livereload:
cd jsapp && make livereload
grunt:
cd jsapp && grunt
xui: init
init:
cd jsapp/src/jsx && ln -sf xui.js index.js
ln -sf /usr/local/freeswitch/xui/lua/xui /usr/local/freeswitch/scripts/
setup: init
cd jsapp && \
npm install
link:
ln -sf /usr/local/freeswitch/storage/* www/
td:
cd jsapp/src/jsx && ln -sf td/index.js index.js
csetup: init
cd jsapp && \
cnpm install #&& \
# bower install
release:
cd jsapp && make release
clean:
rm -f www/assets/js/jsx/*
rm -f www/assets/js/plugins/*
rm -rf www/assets/css/xui*.css
rm -f www/recording
rm -f www/recordings
rm -f www/upload
rm -f www/voicemail
rm -f out/*
plugins-init:
$(foreach N,$(PLUGINS),make -C $(N) init;)
plugins-watch:
$(foreach N,$(PLUGINS),make -C $(N) watch;)
plugins-release:
$(foreach N,$(PLUGINS),make -C $(N) release;)
plugins-clean:
$(foreach N,$(PLUGINS),make -C $(N) clean;)
plugins:
$(foreach N,$(PLUGINS),make -C $(N) release;)
plugin-init:
ifeq ($(plugin),)
@echo "you should add plugin args, eg:plugin=conference"
else
cd jsapp/plugins/${plugin} && make init
endif
plugin-release:
ifeq ($(plugin),)
@echo "you should add plugin args, eg:plugin=conference"
else
cd jsapp/plugins/${plugin} && make release
endif
plugin-clean:
ifeq ($(plugin),)
@echo "you should add plugin args, eg:plugin=conference"
else
cd jsapp/plugins/${plugin} && make clean
endif
out:
mkdir out
tar: out
echo $(HASH)
$(shell date +xui-1.3.0-%Y%m%d%H%M%S-$(HASH) > VERSION)
cd .. && tar cvzf xui/out/`cat xui/VERSION`.tar.gz --exclude xui/lua/xui/xtra_config.lua xui/www xui/lua xui/db xui/VERSION
ls out
ready: clean plugins-init plugins-release release tar
echo "Done"
sync:
rsync -raz www/ $(path)
xswitch:
scp -r lua www [email protected]:/usr/local/freeswitch/xui/
sqlite-init:
make -C db/schema init
pg-init:
make -C db/schema initpg
docker/conf:
cp -R conf/docker docker/conf
docker-dev-init: docker/conf
cp docker/env.example docker/env
docker-dev-start:
docker-compose -f docker/dev.yml up -d
docker-dev-bash:
docker exec -it docker_xswitch_1 bash
docker-dev-stop:
docker-compose -f docker/dev.yml stop
docker-dev-down:
docker-compose -f docker/dev.yml down
docker-dev-cli:
docker exec -it docker_xswitch_1 bash -c "/usr/local/freeswitch/bin/fs_cli"