diff options
author | Eric B Merritt <[email protected]> | 2013-04-09 16:40:29 -0700 |
---|---|---|
committer | Eric B Merritt <[email protected]> | 2013-04-09 16:40:50 -0700 |
commit | 4e863bd88520be1a786026eeb861cb70d00e7b01 (patch) | |
tree | 5fd62ac16db0044a0f8bac4914e39be76ced2447 /src/rcl_app_discovery.erl | |
parent | 9cc71b80c4387579469042b93f3240a0fd7c41c2 (diff) | |
download | relx-4e863bd88520be1a786026eeb861cb70d00e7b01.tar.gz relx-4e863bd88520be1a786026eeb861cb70d00e7b01.tar.bz2 relx-4e863bd88520be1a786026eeb861cb70d00e7b01.zip |
fixes #29 - look for common sub dirs for discovery
With this change relcool looks for the common sub directories to add
to the search. Those directories are now, relative to the project dir,
`apps`, `lib`, `ebin`, and the release output dir.
These automatic subdirs can be disabled by setting
`disable_project_subdirs` to `true` in the config.
The release output dir is also added to the discovery process. This
can be disabled by setting `disable_discover_release_output` to true.
Diffstat (limited to 'src/rcl_app_discovery.erl')
-rw-r--r-- | src/rcl_app_discovery.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rcl_app_discovery.erl b/src/rcl_app_discovery.erl index 43557c4..1f1ecc8 100644 --- a/src/rcl_app_discovery.erl +++ b/src/rcl_app_discovery.erl @@ -86,7 +86,7 @@ setup_overrides(State, AppMetas0) -> Overrides = rcl_state:overrides(State), AppMetas1 = [AppMeta || AppMeta <- AppMetas0, not lists:keymember(app_name(AppMeta), 1, Overrides)], - [case is_valid_otp_app(filename:join([FileName, "ebin", + [case is_valid_otp_app(filename:join([FileName, <<"ebin">>, erlang:atom_to_list(AppName) ++ ".app"])) of {noresult, false} -> {error, {invalid_override, AppName, FileName}}; @@ -134,11 +134,11 @@ is_valid_otp_app(File) -> %% Is this an ebin dir? EbinDir = filename:dirname(File), case filename:basename(EbinDir) of - "ebin" -> - case lists:suffix(".app", File) of - true -> + <<"ebin">> -> + case filename:extension(File) of + <<".app">> -> has_at_least_one_beam(EbinDir, File); - false -> + _ -> {noresult, false} end; _ -> |