-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
45 lines (35 loc) · 979 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
VSN=1.3.2
SERVICE=cloudi_service_tmpo
PATH_PREFIX=/usr/local
CORE_PATH=$(PATH_PREFIX)/lib/cloudi-$(VSN)/lib/cloudi_core-$(VSN)
HOST=localhost
PORT=6467
URL_PREFIX=http://$(HOST):$(PORT)/cloudi/api/erlang
PWD=$(shell pwd)
UUID=<<>>
compile:
MIX_ENV=prod mix compile
clean:
mix clean
start:
@curl -X POST -d '"'$(PATH_PREFIX)/lib/elixir/lib/elixir/ebin'"' $(URL_PREFIX)/code_path_add
@echo
@curl -X POST -d '"'$(PWD)/_build/prod/lib/$(SERVICE)/ebin'"' $(URL_PREFIX)/code_path_add
@echo
@curl -X POST -d @$(SERVICE).conf $(URL_PREFIX)/services_add
@echo
restart:
@curl -X POST -d "[$(UUID)]" $(URL_PREFIX)/services_restart
@echo
stop:
@curl -X POST -d "[$(UUID)]" $(URL_PREFIX)/services_remove
@echo
help:
@echo 'You need to have cloudi running (check with cloudi ping).'
@echo 'Makefile targets:'
@echo ' compile'
@echo ' clean'
@echo ' start'
@echo ' restart UUID="<<...>>"'
@echo ' stop UUID="<<...>>"'
.PHONY: compile clean start restart stop help