···41 {ok, RequiredData} = gather_required_data_from_the_environment(ArgData),
42 do_the_bootstrap(RequiredData).
4344-%% @doc There are two modes 'registery_only' where the register is
45%% created from hex and everything else.
46-spec do_the_bootstrap(#data{}) -> ok.
47do_the_bootstrap(RequiredData = #data{registry_only = true}) ->
···55%% @doc
56%% Argument parsing is super simple only because we want to keep the
57%% dependencies minimal. For now there can be two entries on the
58-%% command line, "registery-only" and "debug-info"
59-spec parse_args([string()]) -> #data{}.
60parse_args(Args0) ->
61 PossibleArgs = sets:from_list(["registry-only", "debug-info"]),
···146147%% @doc
148%% This takes an app name in the standard OTP <name>-<version> format
149-%% and returns just the app name. Why? because rebar is doesn't
150%% respect OTP conventions in some cases.
151-spec fixup_app_name(string()) -> string().
152fixup_app_name(FileName) ->
153 case string:tokens(FileName, "-") of
154 [Name] -> Name;
155- [Name, _Version] -> Name
0156 end.
157158-spec bootstrap_registry(#data{}) -> ok.
···41 {ok, RequiredData} = gather_required_data_from_the_environment(ArgData),
42 do_the_bootstrap(RequiredData).
4344+%% @doc There are two modes 'registry_only' where the register is
45%% created from hex and everything else.
46-spec do_the_bootstrap(#data{}) -> ok.
47do_the_bootstrap(RequiredData = #data{registry_only = true}) ->
···55%% @doc
56%% Argument parsing is super simple only because we want to keep the
57%% dependencies minimal. For now there can be two entries on the
58+%% command line, "registry-only" and "debug-info"
59-spec parse_args([string()]) -> #data{}.
60parse_args(Args0) ->
61 PossibleArgs = sets:from_list(["registry-only", "debug-info"]),
···146147%% @doc
148%% This takes an app name in the standard OTP <name>-<version> format
149+%% and returns just the app name. Why? because rebar doesn't
150%% respect OTP conventions in some cases.
151-spec fixup_app_name(string()) -> string().
152fixup_app_name(FileName) ->
153 case string:tokens(FileName, "-") of
154 [Name] -> Name;
155+ [Name, _Version] -> Name;
156+ [Name, _Version, _Tag] -> Name
157 end.
158159-spec bootstrap_registry(#data{}) -> ok.