Fix statically included 'example_server' atom

This commit is contained in:
Craig Everett 2020-08-26 19:51:22 +09:00
parent 4af35fbb39
commit c5dcbde50b
2 changed files with 14 additions and 8 deletions

View File

@ -1485,7 +1485,8 @@ create_project(P = #project{id = {_, Name, Version}}) ->
munge_sources(#project{type = lib, munge_sources(#project{type = lib,
name = Name, id = {_, Name, _},
name = ProjectName,
license = Title, license = Title,
module = Module, module = Module,
author = Credit, author = Credit,
@ -1497,7 +1498,8 @@ munge_sources(#project{type = lib,
ok = file:make_dir("ebin"), ok = file:make_dir("ebin"),
{ok, ProjectDir} = file:get_cwd(), {ok, ProjectDir} = file:get_cwd(),
Substitutions = Substitutions =
[{"\*PROJECT NAME\*〙", Name}, [{"\*PROJECT NAME\*〙", ProjectName},
{"\*NAME\*〙", Name},
{"\*MODULE\*〙", Module}, {"\*MODULE\*〙", Module},
{"\*VERSION\*〙", VersionString}, {"\*VERSION\*〙", VersionString},
{"\*AUTHOR\*〙", author(Credit, AEmail)}, {"\*AUTHOR\*〙", author(Credit, AEmail)},
@ -1512,7 +1514,8 @@ munge_sources(#project{type = lib,
ok = file:write_file(ModFile, CookedMod), ok = file:write_file(ModFile, CookedMod),
file:set_cwd(ProjectDir); file:set_cwd(ProjectDir);
munge_sources(#project{type = cli, munge_sources(#project{type = cli,
name = Name, id = {_, Name, _},
name = ProjectName,
license = Title, license = Title,
module = Module, module = Module,
author = Credit, author = Credit,
@ -1524,7 +1527,8 @@ munge_sources(#project{type = cli,
ok = file:make_dir("ebin"), ok = file:make_dir("ebin"),
{ok, ProjectDir} = file:get_cwd(), {ok, ProjectDir} = file:get_cwd(),
Substitutions = Substitutions =
[{"\*PROJECT NAME\*〙", Name}, [{"\*PROJECT NAME\*〙", ProjectName},
{"\*NAME\*〙", Name},
{"\*MODULE\*〙", Module}, {"\*MODULE\*〙", Module},
{"\*VERSION\*〙", VersionString}, {"\*VERSION\*〙", VersionString},
{"\*AUTHOR\*〙", author(Credit, AEmail)}, {"\*AUTHOR\*〙", author(Credit, AEmail)},
@ -1539,7 +1543,8 @@ munge_sources(#project{type = cli,
ok = file:write_file(ModFile, CookedMod), ok = file:write_file(ModFile, CookedMod),
file:set_cwd(ProjectDir); file:set_cwd(ProjectDir);
munge_sources(#project{type = Type, munge_sources(#project{type = Type,
name = Name, id = {_, Name, _},
name = ProjectName,
license = License, license = License,
prefix = Prefix, prefix = Prefix,
appmod = AppMod, appmod = AppMod,
@ -1552,7 +1557,8 @@ munge_sources(#project{type = Type,
ok = file:make_dir("ebin"), ok = file:make_dir("ebin"),
{ok, ProjectDir} = file:get_cwd(), {ok, ProjectDir} = file:get_cwd(),
Substitutions = Substitutions =
[{"\*PROJECT NAME\*〙", Name}, [{"\*PROJECT NAME\*〙", ProjectName},
{"\*NAME\*〙", Name},
{"\*VERSION\*〙", VersionString}, {"\*VERSION\*〙", VersionString},
{"\*PREFIX\*〙", Prefix}, {"\*PREFIX\*〙", Prefix},
{"\*APP MOD\*〙", AppMod}, {"\*APP MOD\*〙", AppMod},

View File

@ -41,8 +41,8 @@ ignore() ->
start() -> start() ->
ok = application:ensure_started(sasl), ok = application:ensure_started(sasl),
ok = application:start(example_server), ok = application:start(*NAME*),
io:format("Starting es..."). io:format("Starting...").
-spec start(PortNum) -> ok -spec start(PortNum) -> ok