Closed pankajsoni19 closed 1 year ago
structure
scheduler/src/*.erl
scheduler/deps
scheduler/include
scheduler/src/server_sup.erl
scheduler/src/server_app.erl
below works. ebin/server.app is generated correctly.
make app
make rel breaks with error
erl +A1 -noinput -boot no_dot_erlang -pa ebin/ -pz /Users/pankajsoni/Documents/myyogateacher/repos/scheduler/.erlang.mk/rebar/ebin -eval " {ok, Config} = file:consult(\"/Users/pankajsoni/Documents/myyogateacher/repos/scheduler/relx.config\"), {release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config), Vsn = case Vsn0 of {cmd, Cmd} -> os:cmd(Cmd); semver -> \"\"; {semver, _} -> \"\"; VsnStr -> Vsn0 end, {ok, _} = relx:build_release(#{name => Name, vsn => Vsn}, Config), halt(0)." -- erlang.mk
Solving Release server-1.0.0{"init terminating in do_boot",{{error,{rlx_resolve,{app_not_found,server,undefined}}},[{rlx_resolve,subset,7,[{file,"src/rlx_resolve.erl"},{line,72}]},{rlx_resolve,'-fold_apps/7-fun-0-',7,[{file,"src/rlx_resolve.erl"},{line,99}]},{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},{rlx_resolve,subset,5,[{file,"src/rlx_resolve.erl"},{line,54}]},{rlx_resolve,solve_release,2,[{file,"src/rlx_resolve.erl"},{line,48}]},{relx,build_release_,3,[{file,"src/relx.erl"},{line,170}]},{relx,build_release,3,[{file,"src/relx.erl"},{line,87}]},{erl_eval,do_apply,7,[{file,"erl_eval.erl"},{line,744}]}]}}
init terminating in do_boot ({{error,{rlx_resolve,{app_not_found,server,undefined}}},[{rlx_resolve,subset,7,[{_},{_}]},{rlx_resolve,-fold_apps/7-fun-0-,7,[{_},{_}]},{lists,foldl,3,[{_},{_}]},{rlx_resolve,subset,5,[{_},{_}]},{rlx_resolve,solve_release,2,[{_},{_}]},{relx,build_release_,3,[{_},{_}]},{relx,build_release,3,[{_},{_}]},{erl_eval,do_apply,7,[{_},{_}]}]})
makefile
PROJECT = server
PROJECT_VERSION = $(shell head -n 1 relx.config | awk '{split($$0, a, "\""); print a[2]}')
# app:: rebar.config
COMPILE_FIRST = gen_mod
LOCAL_DEPS = inets mnesia os_mon
DEPS = lager lager_json p1_utils uuid cowboy erlpool jsx mysql_poolboy erlcloud eredis teacup_nats nats_msg base64url
dep_lager = git https://github.com/erlang-lager/lager.git 3.9.2
dep_lager_json = git https://github.com/pankajsoni19/lager-json 1.0.1
dep_p1_utils = git https://github.com/processone/p1_utils.git 1.0.25
dep_uuid = git https://github.com/okeuday/uuid.git v2.0.5
dep_cowboy = git https://github.com/ninenines/cowboy.git 2.9.0
dep_erlpool = git https://github.com/pankajsoni19/erlpool.git v1.4
dep_jsx = git https://github.com/talentdeficit/jsx.git v3.1.0
dep_mysql_poolboy = git https://github.com/mysql-otp/mysql-otp-poolboy.git 0.2.1
dep_erlcloud = git https://github.com/erlcloud/erlcloud.git 3.6.5
dep_eredis = git https://github.com/pankajsoni19/eredis.git v1.3.0
dep_teacup_nats = git https://github.com/yuce/teacup_nats.git 0.4.1
dep_nats_msg = hex 0.4.1
dep_base64url = git https://github.com/dvv/base64url.git 1.0.1
BUILD_DEPS += relx
include erlang.mk
ERLC_OPTS := $(filter-out -Werror,$(ERLC_OPTS))
ERLC_COMPILE_OPTS= +'{parse_transform, lager_transform}'
ERLC_OPTS += $(ERLC_COMPILE_OPTS)
TEST_ERLC_OPTS += $(ERLC_COMPILE_OPTS)
relx.config
{release, {server, "1.0.0"}, [server, sasl, runtime_tools]}.
{dev_mode, false}.
{include_erts, true}.
{include_src, false}.
{extended_start_script, true}.
{sys_config, "config/sys.config"}.
{vm_args, "config/vm.args"}.
That's just how Erlang/OTP works. The application name must match the directory name. Not much I can do about that.
aws code build creates code under temporary directory. its difficult to rename that.
ex
make[1]: Leaving directory '/codebuild/output/src236792627/src/deps/base64url'
what would you suggest in that case?
You can use multi-application layout so your application would be under apps/.
This is using latest erlang.mk build on AWS docker, using ubuntu 18.04 image