Skip to content

Commit

Permalink
release upgrades with rebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Amsenius committed Feb 1, 2011
1 parent 30b1c33 commit d3a1032
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Makefile
Expand Up @@ -11,9 +11,22 @@ all: deps
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
cp rel/reversi_*.tar.gz rel/live/releases/
@echo
@echo "# Now 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

Expand All @@ -26,8 +39,8 @@ distclean: clean releaseclean
schema:
erl -noshell -name $(REVERSI_NODE) -eval 'mnesia:create_schema([node()]).' -s init stop

tables: schema release
rel/reversi/erts-$(ERTS_VERSION)/bin/erl -noshell -name $(REVERSI_NODE) -s mnesia -eval 'reversi_app:create_tables()' -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)' '"."' '[]'
Binary file modified rebar
Binary file not shown.
2 changes: 2 additions & 0 deletions rel/reltool.config
Expand Up @@ -21,6 +21,8 @@
{profile, embedded},
{excl_sys_filters, ["^bin/.*",
"^erts.*/bin/(dialyzer|typer)"]},
{excl_archive_filters, [".*"]},

{app, sasl, [{incl_cond, include}]},
{app, reversi, [{incl_cond, include}]},
{app, reversi_rest, [{incl_cond, include}]}
Expand Down

0 comments on commit d3a1032

Please sign in to comment.