You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/about/security-policy.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ excerpt: ""
6
6
7
7
Rebar3 is a build tool that by design allows arbitrary code execution from downloaded components. Scripts can be executed in all kinds of areas of a regular project workflow including (but not limited to): scripts to modify configuration files, "parse transforms" (macros), plugins, provider and shell hooks, and so on.
8
8
9
-
Users of rebar3 should be aware of the nature of its model, and issues related to these parts of its design will not be considered to be security issues nor vulnerabilities.
9
+
Users of Rebar3 should be aware of the nature of its model, and issues related to these parts of its design will not be considered to be security issues nor vulnerabilities.
10
10
11
11
## Reporting a Security Issue
12
12
@@ -21,7 +21,7 @@ If you have not received a reply to your query within 48 hours, or have not hear
21
21
22
22
- One of the authenticated channels in the maintainers Keybase profiles
23
23
- Open a GitHub issue directly
24
-
- Ask on #rebar3 on the [official Erlang slack team](https://erlef.org/slack-invite/erlanger)
24
+
- Ask on #rebar3 on the [official Erlang Slack team](https://erlef.org/slack-invite/erlanger)
25
25
- Ask on #rebar on IRC on freenode
26
26
- Ask on the [rebar mailing list](http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com)
Copy file name to clipboardExpand all lines: content/en/docs/basic_usage.md
+9-14
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Basic Usage"
3
3
weight: 2
4
4
description: >
5
-
5
+
6
6
---
7
7
8
8
## New App or Release
@@ -16,16 +16,11 @@ Umbrella projects' defining characteristic is that they can contain multiple top
16
16
Rebar3 comes with templates for creating either types of project, callable through the `rebar3 new <template> <project-name>` command. The `<template>` value can be any of:
17
17
18
18
-`app`: a stateful OTP application with a supervision tree, as a single application project
19
-
20
19
-`lib`: a library OTP application (without supervision trees), useful for grouping together various modules, as a single application project
21
-
22
20
-`release`: an umbrella project ready to be released
23
-
24
21
-`escript`: a special form of single application project that can be built as a runnable script
25
-
26
22
-`plugin`: structure for a rebar3 plugin.
27
23
28
-
29
24
For example:
30
25
31
26
```shell
@@ -69,7 +64,7 @@ Now you can add the dep to one of your project's application's .app.src file und
69
64
]}.
70
65
```
71
66
72
-
For more information on dependency handling view the [dependency documentation](/docs/configuration/dependencies)
67
+
For more information on dependency handling view the [dependency documentation](/docs/configuration/dependencies)
73
68
74
69
## Building
75
70
@@ -92,9 +87,10 @@ Output for installing dependencies, building releases and any other output writt
92
87
```shell
93
88
_build/
94
89
└── default
95
-
└── lib
90
+
└── lib
96
91
└── elli
97
92
```
93
+
98
94
More about profiles and the `_build` directory can be found in the [profiles documentation page](/docs/profiles).
99
95
100
96
## Testing
@@ -112,7 +108,7 @@ Dependencies that are only needed for running tests can be placed in the `test`
112
108
]}
113
109
]}.
114
110
```
115
-
111
+
116
112
Now the first time `rebar3 ct` is run `meck` will be installed to `_build/test/lib/`. But it will not be added to `rebar.lock`.
117
113
118
114
```shell
@@ -128,7 +124,6 @@ Releases are built using [relx](https://github.com/erlware/relx).
128
124
129
125
Creating a new project with a release structure and default `relx` config in the `rebar.config` file run:
130
126
131
-
132
127
```shell
133
128
$ rebar3 new release myrel
134
129
===> Writing myrel/apps/myrel/src/myrel_app.erl
@@ -141,6 +136,7 @@ $ rebar3 new release myrel
141
136
===> Writing myrel/LICENSE
142
137
===> Writing myrel/README.md
143
138
```
139
+
144
140
Looking in `rebar.config` we find a couple elements that were not there in our application example.
145
141
146
142
```erlang
@@ -161,21 +157,21 @@ Looking in `rebar.config` we find a couple elements that were not there in our a
161
157
]}.
162
158
```
163
159
164
-
This configuration provides some nice defaults for building a release with relx for development (default profile) and for production (prod profile). When building a release for production we'll most likely want to create a target system (include erts) and definitely will not want the release to contain symlinks to apps (dev_modefalse).
160
+
This configuration provides some nice defaults for building a release with Relx for development (default profile) and for production (prod profile). When building a release for production we'll most likely want to create a target system (include erts) and definitely will not want the release to contain symlinks to apps (`dev_mode``false`).
165
161
166
162
```shell
167
163
$ rebar3 release
168
164
===> Verifying default dependencies...
169
165
===> Compiling myrel
170
166
===> Starting relx build process ...
171
-
===> Resolving OTP Applications from directories:
167
+
===> Resolving OTP Applications from directories:
172
168
_build/default/lib
173
169
/usr/lib/erlang/lib
174
170
===> Resolved myrel-0.1.0
175
171
===> Dev mode enabled, release will be symlinked
176
172
===> release successfully created!
177
173
```
178
-
174
+
179
175
With the default `rebar.config`, creating a compressed archive of the release as a target system is as simple as setting the profile to `prod` and running `tar`:
Copy file name to clipboardExpand all lines: content/en/docs/commands.md
+16-18
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Commands"
3
3
weight: 4
4
4
description: >
5
-
Usage of each rebar3 command.
5
+
Usage of each Rebar3 command.
6
6
---
7
7
8
8
Each command represents a task which runs one or more providers to fulfill the task.
@@ -13,17 +13,17 @@ Higher order task which takes a profile name and list of tasks to run under that
13
13
14
14
## compile
15
15
16
-
After ensuring all dependencies are available, and fetching them if they are not, compile will compile the needed dependencies and the project's apps.app.src and .erl files.
16
+
After ensuring all dependencies are available, and fetching them if they are not, compile will compile the needed dependencies and the project's apps' `.app.src` and `.erl` files.
|`-d/--deps_only`| none | Only compile dependencies, no project apps will be built |
21
21
22
22
## clean
23
23
24
-
Removes compiled beam files from apps.
24
+
Removes compiled BEAM files from apps.
25
25
26
-
The clean command by default removes the beam files for top-level applications. It does so while respecting profiles, which means that 'rebar3 clean' will only clean the default profile, and 'rebar3 as test clean' will only clean the test profile.
26
+
The `clean` command by default removes the BEAM files for top-level applications. It does so while respecting profiles, which means that 'rebar3 clean' will only clean the default profile, and 'rebar3 as test clean' will only clean the test profile.
Performs coverage analysis on modules called by Common Test or Eunit test suites. Call as `rebar3 do ct, cover`, `rebar3 do eunit, cover` or the combination of both with `rebar3 do eunit, ct, cover` while the `{cover_enabled, true}` option is in your rebar config file or if the cover flags were used with these commands individually.
80
+
Performs coverage analysis on modules called by Common Test or Eunit test suites. Call as `rebar3 do ct, cover`, `rebar3 do eunit, cover` or the combination of both with `rebar3 do eunit, ct, cover` while the `{cover_enabled, true}` option is in your rebar config file, or if the cover flags were used with these commands individually.
81
81
82
82
An HTML report is generated.
83
83
@@ -91,22 +91,22 @@ Specific modules can be blacklisted from code coverage by adding `{cover_excl_mo
91
91
92
92
## deps
93
93
94
-
Lists dependencies, whether they're source or package dependencies, and whether they're locked or not. Those that are locked but not matching the lock file are followed by an asterisk (`*`)
94
+
Lists dependencies, whether they're source or package dependencies, and whether they're locked or not. Those that are locked but not matching the lock file are followed by an asterisk (`*`).
95
95
96
96
## do
97
97
98
-
Higher order provider for running multiple tasks in a sequence, separated by commas. Example: `rebar3 do a, b, c`
98
+
Higher order provider for running multiple tasks in a sequence, separated by commas. Example: `rebar3 do a, b, c`.
99
99
100
100
## dialyzer
101
101
102
-
Builds and keeps up-to-date a suitable PLT, and uses it to carry out success typing analysis on the current project.
102
+
Builds and keeps up-to-date a suitable PLT (Persistent Lookup Table), and uses it to carry out success typing analysis on the current project.
For instructions on suppressing warnings [Requesting or Suppressing Warnings in Source Files](http://erlang.org/doc/man/dialyzer.html) section of the Dialyzer documentation.
109
+
For instructions on suppressing warnings read the [Requesting or Suppressing Warnings in Source Files](http://erlang.org/doc/man/dialyzer.html) section of the Dialyzer documentation.
110
110
111
111
PLT files are named `<prefix>_<otp_release>_plt`; The base PLT is a PLT containing the core applications often required for a project's PLT. One base PLT is created per OTP version and stored in `base_plt_location`. A base PLT is then used to build project PLTs.
112
112
@@ -143,7 +143,7 @@ Generates an [escript](http://www.erlang.org/doc/man/escript.html) executable co
143
143
|`escript_shebang`| string | Location of escript file to run. Defaults to `"#!/usr/bin/env escript\n"`. The end of line marker must be included in the string. |
144
144
|`escript_comment`| string | Arbitrary comment to put into the generated escript. Must include a newline marker at the end. Defaults to `%%\n`. |
145
145
146
-
To override the default module name for the escript (which is expected to be the same as the `escript_name`), add `-escript main Module` to `escript_emu_args`
146
+
To override the default module name for the escript (which is expected to be the same as the `escript_name`), add `-escript main Module` to `escript_emu_args`.
147
147
148
148
Example escript configuration from `relx`:
149
149
@@ -154,7 +154,7 @@ Example escript configuration from `relx`:
Unlike rebar2 this command is not required for fetching dependencies. The compile command will result in dependencies being fetched and then built if they aren't already. This command is useful if you have a specific use case that requires fetching dependencies separate from compilation.
172
+
Unlike Rebar 2 this command is not required for fetching dependencies. The compile command will result in dependencies being fetched and then built if they aren't already. This command is useful if you have a specific use case that requires fetching dependencies separate from compilation.
173
173
{{< /blocks/callout >}}
174
174
175
175
Fetch project dependencies.
@@ -196,7 +196,6 @@ Creates a new project from templates. See a list of available templates by provi
|`--app`| Comma separated list of strings | Comma separated list of applications to return paths for. |
@@ -219,7 +218,7 @@ Creates a relup from two releases that were already built by calling `rebar3 rel
219
218
220
219
## report
221
220
222
-
Generates contextual data to include in bug reports
221
+
Generates contextual data to include in bug reports.
223
222
224
223
## shell
225
224
@@ -238,7 +237,7 @@ Runs a shell with project apps and deps in path. Intended for development use on
238
237
|`--env-file`| string | Path to file of os environment variables to setup before expanding vars in config files |
239
238
|`--user_drv_args`| string | Arguments passed to user_drv start function for creating custom shells |
240
239
241
-
The shell booted with this command has an agent running allowing to run rebar3 commands dynamically, such as `r3:compile()` or `r3:upgrade()`, and have new modules automatically reloaded. Specific namespaces can be reached by calling `r3:do(Namespace, Command)`. No arguments can be passed to these commands.
240
+
The shell booted with this command has a running agent that allows running Rebar3 commands dynamically, such as `r3:compile()` or `r3:upgrade()`, and have new modules automatically reloaded. Specific namespaces can be reached by calling `r3:do(Namespace, Command)`. No arguments can be passed to these commands.
242
241
243
242
## tar
244
243
@@ -262,7 +261,7 @@ Unlocks dependencies. If no dependency is mentioned, the command unlocks all of
262
261
263
262
A new lock file is then generated, or the existing lock file is removed in case no locks remain.
264
263
265
-
This command should be used when one or more dependencies have been taken out of rebar.config, but remain in the lock file.
264
+
This command should be used when one or more dependencies have been taken out of `rebar.config`, but remain in the lock file.
266
265
267
266
## update
268
267
@@ -274,8 +273,7 @@ Takes the current dependency specifications in `rebar.config` and fetches the mo
274
273
275
274
|Option|Type|Description|
276
275
|----|----|----|
277
-
|`<dependency>`|string|Dependencies to upgrade (comma-separated).
278
-
If no dependency is mentioned, all dependencies are upgraded.|
276
+
|`<dependency>`|string|Dependencies to upgrade (comma-separated). If no dependency is mentioned, all dependencies are upgraded.|
Copy file name to clipboardExpand all lines: content/en/docs/configuration/config_script.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ If a `<name>.script` exists in the same directory as the original file (in the c
10
10
11
11
For convenience two bindings (variables) are available in a script during evaluation:
12
12
13
-
*`CONFIG` - result of [file:consult/1](http://www.erlang.org/doc/man/file.html#consult-1) if the script file being evaluated also exists
13
+
-`CONFIG` - the result of [file:consult/1](http://www.erlang.org/doc/man/file.html#consult-1) if the script file being evaluated also exists
14
14
15
15
without the ``.script`` extension. Otherwise, `[]`.
16
16
17
-
*`SCRIPT` - filename of the script being evaluated
17
+
-`SCRIPT` - the filename of the script being evaluated
18
18
19
-
In all cases, the data returned by the script, that is the last thing evaluated in the file, must be data in the same format as the original non-script file. For example, if I have `rebar.config.script` that script must return rebar configuration data, if it is an `<app-name>.app.src.script` it must return data in the Application Metadata Format.
19
+
In all cases, the data returned by the script, that is the last thing evaluated in the file, must be data in the same format as the original non-script file. For example, if I have `rebar.config.script` that script must return Rebar3 configuration data, if it is an `<app-name>.app.src.script` it must return data in the Application Metadata Format.
20
20
21
-
Each script may be executed more than once within each rebar execution. It is a good idea to avoid scripts that have side-effects that are not [idempotent](https://en.wikipedia.org/wiki/Idempotence).
21
+
Each script may be executed more than once within each Rebar3 execution. It is a good idea to avoid scripts that have side-effects that are not [idempotent](https://en.wikipedia.org/wiki/Idempotence).
22
22
23
23
## Simple Example
24
24
@@ -35,6 +35,6 @@ case os:getenv("REBAR_DEPS") of
35
35
end.
36
36
```
37
37
38
-
Whenever you want to build 'properly' (which you should, regularly), simply call `unset REBAR_DEPS` (or equivalent), and perform a clean build.
38
+
Whenever you want to build 'properly' (which you should, regularly), simply call `unset REBAR_DEPS` (or equivalent), and perform a clean build.
39
39
40
-
Note that `file:script/2` differs from `file:consult/1` in that only the result of the last expression is returned. You must therefore take care to return a list of config items. Before that, you may do any form of IO (including network), checking OS environment variables, reading files (perhaps calling `file:script/2` on other files) or writing files. You can basically use all OTP libs. As in `file:eval/2`, each expression is terminated with a full stop.
40
+
Note that `file:script/2` differs from `file:consult/1` in that only the result of the last expression is returned. You must therefore take care to return a list of config items. Before that, you may do any form of I/O (including network), checking OS environment variables, reading files (perhaps calling `file:script/2` on other files) or writing files. You can basically use all OTP libs. As in `file:eval/2`, each expression is terminated with a full stop.
0 commit comments