Skip to content

Commit

Permalink
Merge pull request #819 from tsloughter/prepare-for-4.0.0
Browse files Browse the repository at this point in the history
update readme, remove old examples and move osx tests to github actions
  • Loading branch information
tsloughter authored Aug 30, 2020
2 parents bd28b69 + fa8be96 commit f2aefc5
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 178 deletions.
9 changes: 0 additions & 9 deletions .cirrus.yml

This file was deleted.

19 changes: 16 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ name: Common Test
on:
pull_request:
branches:
- '4.0.0'
- 'master'
push:
branches:
- '4.0.0'
- 'master'

jobs:
build:
linux:
name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}

Expand All @@ -33,3 +31,18 @@ jobs:
run: rebar3 xref
- name: Dialyzer
run: rebar3 dialyzer

macos:
name: Test on MacOS
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Install Erlang
run: brew install erlang
- name: Install rebar3
run: |
wget https://s3.amazonaws.com/rebar3/rebar3
chmod +x rebar3
- name: CT tests
run: ./rebar3 ct
94 changes: 25 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,41 @@
Relx
=======

A release assembler for Erlang.

Synopsis
--------

relx [*options*] [*release-specification-file*]

Description
-----------

Relx assembles releases for an Erlang/OTP release. Given a release
Relx is a library that assembles Erlang/OTP releases. 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
--------
applications it will generate a release output.

To build relx and generate a standalone escript executable:
It is generally used through the Erlang/OTP build tool
[rebar3](https://www.rebar3.org/) which provides a cli interface.

$ ./rebar3 update
$ ./rebar3 as escript escriptize

This creates the executable `_build/escript/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 `PATH` environment variable. To start the build
use the `bootstrap` batch file:
Documentation
-----------

c:\> bootstrap
`relx` is a library used by [rebar3](https://www.rebar3.org/). Documentation on
using `rebar3` for building releases with `relx` can be found on
[rebar3.org](https://www.rebar3.org/docs/releases).

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.
Also see [Adopting Erlang's Releases
chapter](https://adoptingerlang.org/docs/production/releases/).

Config File
-----------

By default `relx` looks for `relx.config` in the current working directory:
Building and Testing
--------

```erlang
{release, {relname, "vsn"},
[app1,
app2]}.
Common Test suites can be run with `rebar3`:

{extended_start_script, true}.
``` shell
$ rebar3 compile
$ rebar3 ct
```

Options
-------
Tests for the start scripts that are generated by `relx` are tested with
[shelltestrunner](https://github.com/simonmichael/shelltestrunner/).

| Short | Long | Type | Default | Description |
|:-----:|:------------:|:-------:|:------:|------------------------------------------------------------------------------------------- |
| -r | --root | string | ./ | Sets the root of the project |
| -n | --relname | string | | Name for the release that will be generated |
| -v | --relvsn | string | | Version for the release |
| -u | --upfrom | string | | The release to upgrade from. Only valid with relup target |
| -o | --output-dir | string | ./ | The output directory for the release |
| -l | --lib-dir | string | | Additional dirs to search for OTP apps |
| | --system_libs | boolean/string | true | If 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 | --path | string | | Additional dirs to add to Erlang code path |
| | --default-libs | boolean | true | Whether to use the default system added lib dirs (means you must add them all manually) |
| -V | --verbose | integer | 2 | The verbosity level between 0 and 3 |
| -a | --override_app | string | | An app name and a directory to override in the form appname:dir |
| -c | --config | string | ./relx.config | Config file path |
| | --overlay_vars | string | | Path to a file of overlay variables |
| | --vm_args | string | | Path to a file to use for vm.args |
| | --sys_config | string | | Path to a file to use for sys.config |
| -d | --dev-mode | boolean | false | Symlink all applications and configuration into the release instead of copying|
| -i | --include-erts | boolean/string | true | If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts |
The script `shelltests/run_tests.sh` will clone `rebar3` master and build it
with the current `relx` as a checkout dependency and then run the tests using
that `rebar3` escript:

Wiki
----

[relx wiki](https://github.com/erlware/relx/wiki)
``` shell
$ shelltests/run_tests.sh
```
75 changes: 0 additions & 75 deletions examples/relx.config

This file was deleted.

19 changes: 0 additions & 19 deletions examples/relx_simple.config

This file was deleted.

Empty file modified priv/templates/bin
100755 → 100644
Empty file.
Empty file modified priv/templates/extended_bin
100755 → 100644
Empty file.
3 changes: 0 additions & 3 deletions relx.config

This file was deleted.

0 comments on commit f2aefc5

Please sign in to comment.