- Project creation/init continuation corrected
- Remove OS call to grep
This commit is contained in:
Craig Everett 2020-07-03 13:51:08 +09:00
parent 15ab6ca577
commit 45642e629e
49 changed files with 36 additions and 27 deletions

View File

@ -1 +1 @@
0.11.2 0.11.3

View File

@ -1,9 +1,11 @@
{application,zx, {application,zx,
[{description,"An Erlang development tool and Zomp user client"}, [{description,"An Erlang development tool and Zomp user client"},
{vsn,"0.11.2"}, {vsn,"0.11.3"},
{applications,[stdlib,kernel]}, {applications,[stdlib,kernel]},
{modules,[zx,zx_auth,zx_conn,zx_conn_sup,zx_daemon,zx_key, {modules,[zx,zx_auth,zx_conn,zx_conn_sup,zx_daemon,zx_key,
zx_lib,zx_local,zx_net,zx_peer,zx_peer_man, zx_lib,zx_local,zx_net,zx_peer,zx_peer_man,
zx_peer_sup,zx_peers,zx_proxy,zx_sup,zx_tty, zx_peer_sup,zx_peers,zx_proxy,zx_sup,zx_tty,
zx_userconf,zx_zsp]}, zx_userconf,zx_zsp,funfile,appmod,'_client',
'_client_man','_client_sup','_clients','_sup',appmod,
'_con','_gui','_sup',simplecli]},
{mod,{zx,none}}]}. {mod,{zx,none}}]}.

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -24,7 +24,7 @@
%%% @end %%% @end
-module(zx). -module(zx).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(application). -behavior(application).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -9,7 +9,7 @@
%%% @end %%% @end
-module(zx_auth). -module(zx_auth).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -7,7 +7,7 @@
%%% @end %%% @end
-module(zx_conn). -module(zx_conn).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -5,7 +5,7 @@
%%% @end %%% @end
-module(zx_conn_sup). -module(zx_conn_sup).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(supervisor). -behavior(supervisor).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -138,7 +138,7 @@
%%% @end %%% @end
-module(zx_daemon). -module(zx_daemon).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(gen_server). -behavior(gen_server).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -8,7 +8,7 @@
%%% @end %%% @end
-module(zx_key). -module(zx_key).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -10,7 +10,7 @@
%%% @end %%% @end
-module(zx_lib). -module(zx_lib).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
-module(zx_local). -module(zx_local).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").
@ -239,7 +239,7 @@ initialize(P = #project{type = Type,
project_check(P = #project{id = PackageID}, Continue, Retry) -> project_check(P = #project{id = PackageID}, Continue, Retry) ->
case package_exists(PackageID) of case package_exists(PackageID) of
false -> false ->
zompify(P); Continue(P);
true -> true ->
Message = Message =
"~nDHOH!~n" "~nDHOH!~n"
@ -432,8 +432,7 @@ initialize_app_file({_, Name, Version}, AppMod, Type, Desc) ->
{included_applications, []}, {included_applications, []},
{applications, [stdlib, kernel]}]} {applications, [stdlib, kernel]}]}
end, end,
Grep = "grep -roP '^-module\\(\\K[^)]+' src/* | cut -d: -f2", Modules = list_modules(),
Modules = [list_to_atom(M) || M <- string:lexemes(os:cmd(Grep), "\n")],
Properties = Properties =
case (Type == cli) or (Type == lib) of case (Type == cli) or (Type == lib) of
true -> true ->
@ -451,6 +450,15 @@ initialize_app_file({_, Name, Version}, AppMod, Type, Desc) ->
zx_lib:write_terms(AppFile, [AppProfile]). zx_lib:write_terms(AppFile, [AppProfile]).
list_modules() -> list_modules(".").
-spec list_modules(BaseDir :: file:filename()) -> [module()].
list_modules(Dir) ->
Target = filename:join(Dir, "**/*.erl"),
[list_to_atom(filename:basename(F, ".erl")) || F <- filelib:wildcard(Target)].
-spec update_meta() -> zx:outcome(). -spec update_meta() -> zx:outcome().
update_meta() -> update_meta() ->
@ -641,8 +649,7 @@ update_app_file(Meta) ->
{included_applications, []}, {included_applications, []},
{applications, [stdlib, kernel]}]} {applications, [stdlib, kernel]}]}
end, end,
Grep = "grep -roP '^-module\\(\\K[^)]+' src/* | cut -d: -f2", Modules = list_modules(),
Modules = [list_to_atom(M) || M <- string:lexemes(os:cmd(Grep), "\n")],
Properties = [{description, Desc}, {vsn, VersionString}, {modules, Modules}], Properties = [{description, Desc}, {vsn, VersionString}, {modules, Modules}],
Store = fun(T, L) -> lists:keystore(element(1, T), 1, L, T) end, Store = fun(T, L) -> lists:keystore(element(1, T), 1, L, T) end,
AppData = lists:foldl(Store, RawAppData, Properties), AppData = lists:foldl(Store, RawAppData, Properties),

View File

@ -5,7 +5,7 @@
%%% @end %%% @end
-module(zx_net). -module(zx_net).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -8,7 +8,7 @@
%%% @end %%% @end
-module(zx_peer). -module(zx_peer).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -9,7 +9,7 @@
%%% @end %%% @end
-module(zx_peer_man). -module(zx_peer_man).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(gen_server). -behavior(gen_server).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
-module(zx_peer_sup). -module(zx_peer_sup).
-vsn("0.11.2"). -vsn("0.11.3").
-behaviour(supervisor). -behaviour(supervisor).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -10,7 +10,7 @@
%%% @end %%% @end
-module(zx_peers). -module(zx_peers).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(supervisor). -behavior(supervisor).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -5,7 +5,7 @@
%%% @end %%% @end
-module(zx_proxy). -module(zx_proxy).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -5,7 +5,7 @@
%%% @end %%% @end
-module(zx_sup). -module(zx_sup).
-vsn("0.11.2"). -vsn("0.11.3").
-behavior(supervisor). -behavior(supervisor).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
-module(zx_tty). -module(zx_tty).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -5,7 +5,7 @@
%%% @end %%% @end
-module(zx_userconf). -module(zx_userconf).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -7,7 +7,7 @@
%%% @end %%% @end
-module(zx_zsp). -module(zx_zsp).
-vsn("0.11.2"). -vsn("0.11.3").
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").
-license("GPL-3.0"). -license("GPL-3.0").

View File

@ -9,7 +9,7 @@
{license,"MIT"}. {license,"MIT"}.
{modules,[]}. {modules,[]}.
{name,"zx"}. {name,"zx"}.
{package_id,{"otpr","zx",{0,11,2}}}. {package_id,{"otpr","zx",{0,11,3}}}.
{prefix,"zx_"}. {prefix,"zx_"}.
{repo_url,"https://gitlab.com/zxq9/zx"}. {repo_url,"https://gitlab.com/zxq9/zx"}.
{tags,["tools","package manager","erlang"]}. {tags,["tools","package manager","erlang"]}.