Last active
December 11, 2015 05:58
-
-
Save legoscia/4555365 to your computer and use it in GitHub Desktop.
reltool doesn't like non-numeric version numbers in directory names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
{application, foo_app, | |
[ | |
%% This application has a non-numeric version number. | |
{vsn, "abc"}]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
{sub_dirs, ["foo_app", "bar_rel"]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- erlang -*- | |
{sys, | |
[ | |
{lib_dirs, ["../apps"]}, | |
{rel, "bar_rel", "1", [foo_app]}, | |
{rel, "start_clean", "1", [kernel, stdlib]}]}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment