Refer to the rebar wiki for the following process.
The rebar version must be noted that the higher version has bugs for the following two commands:
rebar generate-appupsrebar generate-upgrade
Versions 2.2.0 are available after tests, but the clean and compile commands of this version do not support the-R parameter.
Example:
You can use the rebar-creator script to create a project. I use the latter, which is more convenient.
The project I created is tcp_server.
Modify apps. the version number of the vsn field in your app and SRC file is the same as that of the rel field in REL/reltool. config. Test to write 0.1
(Is it possible to be inconsistent? It is unclear, but the official demo is consistent; and it should be consistent as Version Management)
rebar compile;rebar compile;rebar generate -f;
Rename REL/tcp_server to tcp_server_0.1
Change the version number to 0.2 again.
Re-compile:
rebar clean;rebar compile;rebar generate -f;rebar generate-appups previous_release=tcp_server_0.1;rebar generate-upgrade previous_release=tcp_server_0.1;
Then, you can see a compressed tcp_server_0.2.tat.gz package in your relobject.
We will route this compressed package to tcp_server_0.1/release.
CD tcp_server_0.1./bin/tcp_server console enter the shellrelease_handler: which_releases () of Erlang ().
It should be 0.1.
Decompress the 0.2 package and install it.
erl> release_handler:unpack_release("tcp_server_0.2").erl> release_handler:install_release("0.2").erl> release_handler:make_permanent("0.2").erl> release_handler:which_releases().
Erlang hot deployment