Permalink
Browse files

release upgrades with rebar

  • Loading branch information...
1 parent 30b1c33 commit d3a10320289d6677cbe3cbe6c3b9b2bc25cdbd6a Andreas Amsenius committed Feb 1, 2011
Showing with 17 additions and 2 deletions.
  1. +15 −2 Makefile
  2. BIN rebar
  3. +2 −0 rel/reltool.config
View
@@ -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
@@ -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)' '"."' '[]'
View
BIN rebar
Binary file not shown.
View
@@ -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}]}

0 comments on commit d3a1032

Please sign in to comment.