diff options
author | Eric Bailey <eric@ericb.me> | 2016-11-23 15:07:31 -0600 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2016-12-08 00:11:41 +0200 |
commit | ab9688a63adffc78ef38d45d7891a5be2459fbd5 (patch) | |
tree | fb743055c15855603edf5505ab75b1f873bcec69 /pkgs/development/tools | |
parent | fe727a19c10bd7ddf72a71ee573c269ac7431b27 (diff) | |
download | nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar.gz nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar.bz2 nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar.lz nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar.xz nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.tar.zst nixlib-ab9688a63adffc78ef38d45d7891a5be2459fbd5.zip |
rebar3: Fix typos and support name-version-tag
The fixup_app_name/1 change notably supports packages like proper-1.1.1-beta.
Diffstat (limited to 'pkgs/development/tools')
-rwxr-xr-x | pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap b/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap index 30ff235d12cf..81257dd8c0cb 100755 --- a/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap +++ b/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap @@ -41,7 +41,7 @@ main(Args) -> {ok, RequiredData} = gather_required_data_from_the_environment(ArgData), do_the_bootstrap(RequiredData). -%% @doc There are two modes 'registery_only' where the register is +%% @doc There are two modes 'registry_only' where the register is %% created from hex and everything else. -spec do_the_bootstrap(#data{}) -> ok. do_the_bootstrap(RequiredData = #data{registry_only = true}) -> @@ -55,7 +55,7 @@ do_the_bootstrap(RequiredData) -> %% @doc %% Argument parsing is super simple only because we want to keep the %% dependencies minimal. For now there can be two entries on the -%% command line, "registery-only" and "debug-info" +%% command line, "registry-only" and "debug-info" -spec parse_args([string()]) -> #data{}. parse_args(Args0) -> PossibleArgs = sets:from_list(["registry-only", "debug-info"]), @@ -146,13 +146,14 @@ make_symlink(Path, TargetFile) -> %% @doc %% This takes an app name in the standard OTP <name>-<version> format -%% and returns just the app name. Why? because rebar is doesn't +%% and returns just the app name. Why? because rebar doesn't %% respect OTP conventions in some cases. -spec fixup_app_name(string()) -> string(). fixup_app_name(FileName) -> case string:tokens(FileName, "-") of [Name] -> Name; - [Name, _Version] -> Name + [Name, _Version] -> Name; + [Name, _Version, _Tag] -> Name end. -spec bootstrap_registry(#data{}) -> ok. |