-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (34 loc) · 1.21 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
ERL ?= erl
APP := reversi
REVERSI_NODE = reversi@127.0.0.1
ERTS_VERSION = 5.7.5
.PHONY: deps
all: deps
@./rebar compile
release: all
@./rebar generate
releaseschema:
@cd rel/reversi/ && ./erts-*/bin/erl -noshell -name $(REVERSI_NODE) -eval 'mnesia:create_schema([node()]).' -s mnesia -eval 'reversi_app:create_tables()' -s init stop
releaseclean:
rm -rf rel/reversi
releaseupgrade: release
./rebar generate-upgrade previous_release=live
@echo
@echo "# copy rel/reversi_Vsn.tar.gz to reversi/releases/ on live"
@echo "# use release_handler in the running erlang console for the deploy:"
@echo "erl> release_handler:unpack_release(\"reversi_UpdateVsn\")."
@echo "erl> release_handler:install_release(\"UpdateVsn\")."
@echo "erl> release_handler:make_permanent(\"UpdateVsn\")."
@echo "erl> release_handler:which_releases()."
deps:
@./rebar get-deps
clean:
@./rebar clean
distclean: clean releaseclean
@./rebar delete-deps
schema:
erl -noshell -name $(REVERSI_NODE) -eval 'mnesia:create_schema([node()]).' -s init stop
tables: schema
erl -pa apps/*/ebin -noshell -name $(REVERSI_NODE) -s mnesia -eval 'reversi_app:create_tables()' -s init stop
# docs:
# @erl -noshell -run edoc_run application '$(APP)' '"."' '[]'