public
Last active

reltool doesn't like non-numeric version numbers in directory names

  • Download Gist
bar_rel/reltool.config
1 2 3 4 5 6
%% -*- erlang -*-
{sys,
[
{lib_dirs, ["../apps"]},
{rel, "bar_rel", "1", [foo_app]},
{rel, "start_clean", "1", [kernel, stdlib]}]}.
foo_app/src/foo_app.app.src
1 2 3 4 5
%% -*- erlang -*-
{application, foo_app,
[
%% This application has a non-numeric version number.
{vsn, "abc"}]}.
rebar.config
1 2 3
%% -*- erlang -*-
 
{sub_dirs, ["foo_app", "bar_rel"]}.
try.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/bin/sh
mysubdir=$1
if [ -z "$mysubdir" ]; then
echo "Usage: $0 subdirname"
echo ""
echo "subdirname is the directory name that the foo_app application will"
echo "be symlinked to in the apps/ directory. My observation is that"
echo "reltool accepts 'foo_app' and 'foo_app-1', but rejects 'foo_app-abc',"
echo "while starting an application works for all three names."
exit 1
fi
 
echo Compiling foo_app
rebar compile
 
echo Creating/cleaning apps
rm -rf apps
mkdir apps
 
echo Symlinking foo_app into apps/$mysubdir
ln -sf $PWD/foo_app apps/$mysubdir
 
echo Try starting the application
env ERL_LIBS=$PWD/apps erl -noshell -eval 'io:format("application:start(foo_app) -> ~p~n", [application:start(foo_app)])' -s init stop
 
echo Try building the release
rebar generate

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.