erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

Issue 629: Ability to install hot patches #630

Closed vasu-dasari closed 6 years ago

vasu-dasari commented 6 years ago

Adds a new option hotpatch to list of options to extended_bin

From release directory one can do:

./bin/<release-name> hotpatch <List of beam files>

For example, for a project foo, trying to add 3 beam files which are in different directories.

root@5a00493145e7# ./bin/foo hotpatch patch/a.beam patch/b.beam somedir/c.beam
Loading patch/a.beam: done
Loading patch/b.beam: no change
Loading somedir/c.beam: file does not exist, just loading binary

In above example,

  1. a.beam is indeed modified, so it is loaded.
  2. b.beam is same as the one that is being in use, so no change is made
  3. c.beam is a new beam file which is not known to the project. So, the binary is just loaded into the Erlang VM. It is expected that user does a full software upgrade via package file mechanism so that file physically exists in the system.