Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
1  .gitignore
@@ -1,3 +1,2 @@
-ebin
*.beam
*~
View
10 apps/dummy_app/ebin/dummy_app.appup
@@ -0,0 +1,10 @@
+{"2",
+ %% Upgrade instructions from 1 to 2
+ [{"1", [
+ {load_module, dummy_app_server}
+ ]}],
+ %% Downgrade instructions from 2 to 1
+ [{"1",[
+ {load_module, dummy_app_server}
+ ]}]
+}.
View
2  apps/dummy_app/src/dummy_app.app.src
@@ -1,7 +1,7 @@
{application, dummy_app,
[
{description, "Dummy project to test release process"},
- {vsn, "1"},
+ {vsn, "2"},
{registered, []},
{applications, [
kernel,
View
15 apps/dummy_app/src/dummy_app_server.erl
@@ -3,7 +3,7 @@
-behaviour(gen_server).
%% API
--export([start_link/0, poke/0, num_pokes/0]).
+-export([start_link/0, poke/0, num_pokes/0, poke_twice/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -18,6 +18,9 @@ start_link() ->
poke() ->
gen_server:call(?MODULE, poke).
+poke_twice() ->
+ gen_server:call(?MODULE, poke_twice).
+
num_pokes() ->
gen_server:call(?MODULE, num_pokes).
@@ -29,6 +32,12 @@ init([]) ->
handle_call(num_pokes, _From, State = #state{ num_pokes = PokeCount }) ->
{reply, PokeCount, State};
+handle_call(poke_twice, _From, State) ->
+ NewPokeCount = State#state.num_pokes + 2,
+ NewState = State#state{num_pokes = NewPokeCount},
+ Reply = {ok, NewPokeCount},
+ {reply, Reply, NewState};
+
handle_call(poke, _From, State) ->
NewPokeCount = State#state.num_pokes + 1,
NewState = State#state{num_pokes = NewPokeCount},
@@ -44,7 +53,9 @@ handle_info(_Info, State) ->
terminate(_Reason, _State) ->
ok.
-code_change(_OldVsn, State, _Extra) ->
+code_change(OldVsn, State, Extra) ->
+ error_logger:info_msg("code_change, oldvsn:~p state:~p extra:~p~n",
+ [OldVsn, State, Extra]),
{ok, State}.
%%% Internal functions
View
3  rel/reltool.config
@@ -1,6 +1,6 @@
{sys, [
{lib_dirs, ["../apps"]},
- {rel, "dummy", "1",
+ {rel, "dummy", "2",
[
kernel,
stdlib,
@@ -31,3 +31,4 @@
{copy, "files/app.config", "etc/app.config"},
{copy, "files/vm.args", "etc/vm.args"}
]}.
+

No commit comments for this range

Something went wrong with that request. Please try again.