diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | rebar.config | 5 | ||||
-rw-r--r-- | src/rlx_depsolver.erl | 4 | ||||
-rw-r--r-- | src/rlx_dscv_util.erl | 7 |
5 files changed, 12 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 764fe9c..0217788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: erlang otp_release: - - 17.0-rc1 - R16B03-1 - R16B03 - R16B02 @@ -64,7 +64,8 @@ Options | Short | Long | Type | Default | Description | |:-----:|:------------:|:-------:|:------:|------------------------------------------------------------------------------------------- | -| -r | --root | string | ./ | Name for the release that will be generated | +| -r | --root | string | ./ | Sets the root of the project | +| -n | --name | string | | Name for the release that will be generated | | -v | --relvsn | string | | Version for the release | | -g | --goal | string | | A goal for the system. These are usually the OTP apps that are part of the release | | -u | --upfrom | string | | The release to upgrade from. Only valid with relup target | diff --git a/rebar.config b/rebar.config index cf03ea3..a250ce9 100644 --- a/rebar.config +++ b/rebar.config @@ -21,7 +21,10 @@ %% Compiler Options ============================================================ {erl_opts, - [debug_info, warnings_as_errors, inline]}. + [{platform_define, "^[0-9]+", namespaced_types}, + debug_info, + warnings_as_errors, + inline]}. %% EUnit ======================================================================= {eunit_opts, diff --git a/src/rlx_depsolver.erl b/src/rlx_depsolver.erl index 20423d0..5d78174 100644 --- a/src/rlx_depsolver.erl +++ b/src/rlx_depsolver.erl @@ -112,7 +112,11 @@ %%============================================================================ %% type %%============================================================================ +-ifdef(namespaced_types). +-type dep_graph() :: gb_tree:tree(). +-else. -type dep_graph() :: gb_tree(). +-endif. -opaque t() :: {?MODULE, dep_graph()}. -type pkg() :: {pkg_name(), vsn()}. -type pkg_name() :: binary() | atom(). diff --git a/src/rlx_dscv_util.erl b/src/rlx_dscv_util.erl index a4a265c..aa642b8 100644 --- a/src/rlx_dscv_util.erl +++ b/src/rlx_dscv_util.erl @@ -110,11 +110,8 @@ discover_dir(ProcessDir, File, symlink) -> discover_real_symlink_dir(ProcessDir, File) end. -discover_real_symlink_dir(ProcessDir, File) -> - {ok, CurCwd} = file:get_cwd(), - ok = file:set_cwd(File), - {ok, ActualRealDir} = file:get_cwd(), - ok = file:set_cwd(CurCwd), +discover_real_symlink_dir(ProcessDir, File) -> + {ok, ActualRealDir} = file:read_link(File), case lists:prefix(iolist_to_list(filename:absname(ActualRealDir)), iolist_to_list(filename:absname(File))) of true -> |