rebar3 would crash if the option `{keep_logs, N}` was present and
there were more than N run directories in the log dir, so if the
option is found we keep the N-1 newest directories and delete the
rest.
While we are at it, as this should fix the crash, let's limit the
number of logs runs to keep from test runs in rebar3 to 5.
End result should allow to look like this:
$ head -n 3 rebar3
#!/usr/bin/env escript
%% Rebar3 3.14.0-rc1
%%! +sbtu +A1
This will allow tools like mix to read the top of the file to know the
version being used in the current path (when using features that aren't
forwards-compatible) without having to invoke the tool itself.
The version (full dynamic one) is also added to the local install:
$ head -n 2 /home/ferd/.cache/rebar3/bin/rebar3
#!/usr/bin/env sh
## Rebar3 3.14.0-rc1+build.4599.ref6b0f90d
The `##` comments are used to keep a fixed width over the other form.
To be backported to 3.13.2 as well.
This commit switches the relx dependency to branch 4.0.0. It is the
first iteration of integration with relx 4.0 which adds many changes
to how relx works and how the two integrate.
rebar_relx module now creates a relx state from the relx configuration
and pass it along with all the OTP applications rebar3 knows about
which may be used in the release. This allows relx to not have
to duplicate the effort of application discovery like before.
Since this is intended to be released only when OTP-23 is released
the testing of OTP-18 has been removed.
Fixes#2159; this is done by force-reloading the handlers to match the
config.
This can create a bit of a funny effect if sys.config specifies an INFO
log level (or lower) is specified. While apps are booted for config
changes before the cth_failonly hook is enabled, supervision and other
application log messages can start being output. They will start being
suppressed once the CT run begins.
This is not a bug, it's a race in instantiation of control and enabling
of log levels. Nothing we can do about that. It might however surprise
people a good bit. If non-default stdout handlers are added, they are
similarly likely to become noisy; specifying a test-specific sys.config
file may be necessary then.
Also includes a bump of cth_readable version, which now checks for
updates to the log formatter on every test output.
- vendor in hex_core at v0.5.0
- Change where repo_name should be the org and not the parent
- Changed rebar_utils:url_append_path/2 to not explicitly add a '?',
this is returned in the Query chunk by http_uri:parse/1 (e.g., "?foo=bar")
- update organization_merging test to expect the sub-repo as the repo_name
- Add tests for rebar_utils:url_append_path/2
- Stop referencing/setting "organization" in config and use new
organization settings (api_repository and repo_organization)
- Do not set (assume) the read key is valid for any/every repo
- Set repo_organization and api_repository to org
- Update tests to check for new config opts
* bump bbmustache to version 1.6.0
* Use alternative bbmustache brackets in templates
This fixes the problems where literal nested tuples (`{{a,b},c}` or
`{{a,b}}`) would blow up and spaces needed to be inserted.
* add compile type for dynamic project compilation
* new rebar_compiler abstraction for running multiple compilers
rebar_compiler is a new behaviour that a plugin can implement to
be called on any ues of the compile provider to compile source
files and keep track of their dependencies.
* fix check that modules in .app modules list are from src_dirs
* use project_type to find module for building projects
* allow plugins to add project builders and compilers
When REBAR_CONFIG was set it would not effect the top level app's
configuration because app_discover was rereading the top level
rebar.config which ignored REBAR_CONFIG. Instead this patch has
it use the existing configuration from REBAR_CONFIG.
* update to hex_core for hex-v2 repo support (#1865)
* update to hex_core for hex-v2 repo support
This patch adds only single repo hex-v2 support through hex_core.
Packages no longer filtered out by buildtool metadata and the
package index is updated per-package instead of fetched as one
large ets dump.
* tell travis to also build hex_core branch
* support list of repos for hex packages (#1866)
* support list of repos for hex packages
repos are defined under the hex key in rebar configs. They can be
defined at the top level of a project or globally, but not in
profiles and the repos configured in dependencies are also ignored.
Searching for packages involves first checking for a match in the
local repo index cache, in the order repos are defined. If not found
each repo is checked through the hex api for any known versions of
the package and the first repo with a version that fits the constraint
is used.
* add {repos, replace, []} for overriding the global & default repos
* add hex auth handling for repos (#1874)
auth token are kept in a hex.config file that is modified by the
rebar3 hex plugin.
Repo names that have a : separating a parent and child are considered
organizations. The parent repo's auth will be included with the child.
So an organization named hexpm:rebar3_test will include any hexpm
auth tokens found in the rebar3_test organization's configuration.
* move packages to top level of of hexpm cache dir (#1876)
* move packages to top level of of hexpm cache dir
* append organization name to parent's repo_url when parsing repos
* only eval config scripts and apply overrides once per app (#1879)
* only eval config scripts and apply overrides once per app
* move new resource behaviour to rebar_resource_v2 and keep v1
* cleanup use of rebar_resource module and unused functions
* cleanup error messages and unused code
* when discovering apps support mix packages as unbuilt apps (#1882)
* use hex_core tarball unpacking support in pkg resource (#1883)
* use hex_core tarball unpacking support in pkg resource
* ignore etag if package doesn't exist and delete if checksum fails
* add back tests for bad package checksums
* improve bad registry checksum error message