Total Pageviews

Wednesday 7 September 2016

Relx

Sane, simple release creation for Erlang 
A release assembler for Erlang.

Synopsis

relx [options] [release-specification-file]

Description

Relx assembles releases for an Erlang/OTP release. Given a release specification and a list of directories in which to search for OTP applications it will generate a release output. That output depends heavily on what plugins available and what options are defined, but usually it is simply a well configured release directory.
The release-specification-file is optional but otherwise contains additional specification information for releases.

Building

To build relx and generate a standalone escript executable:
$ ./rebar3 update
$ ./rebar3 escriptize
This creates the executable _build/default/bin/relx.

Building on Windows

To build relx on Windows you'll need to have rebar3 installed and the path to the rebar3 binary added to the PATHenvironment variable. To start the build use the bootstrap batch file:
c:\> bootstrap
This creates the executable relx and the relx.cmd shortcut script. Copy both of these files to a directory and make the directory available to the PATH environment variable.

Config File

By default relx looks for relx.config in the current working directory:
{release, {relname, "vsn"},
 [app1,
  app2]}.

{extended_start_script, true}.

Options

ShortLongTypeDefaultDescription
-r--rootstring./Sets the root of the project
-n--relnamestringName for the release that will be generated
-v--relvsnstringVersion for the release
-g--goalstringA goal for the system. These are usually the OTP apps that are part of the release
-u--upfromstringThe release to upgrade from. Only valid with relup target
-o--output-dirstring./The output directory for the release
-l--lib-dirstringAdditional dirs to search for OTP apps
--system_libsboolean/stringtrueIf true include a copy of system libs used to build with, if a path include system libs at that path. If false, do not include system libs
-p--pathstringAdditional dirs to add to Erlang code path
--default-libsbooleantrueWhether to use the default system added lib dirs (means you must add them all manually)
-V--verboseinteger2The verbosity level between 0 and 3
-a--override_appstringAn app name and a directory to override in the form appname:dir
-c--configstring./relx.configConfig file path
--overlay_varsstringPath to a file of overlay variables
--vm_argsstringPath to a file to use for vm.args
--sys_configstringPath to a file to use for sys.config
-d--dev-modebooleanfalseSymlink all applications and configuration into the release instead of copying
-i--include-ertsboolean/stringtrueIf true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts

Wiki


from https://github.com/erlware/relx