basho/rebar — pull request #147 by doubleyou (2011-10-18 11:56:06+00:00)
Title: Added an ability to include the src/ stuff into the release

Say, we have the following directory structure for our application:

.
..
deps/
someapp/
anotherapp/
ebin/
myapp.app
include/
src/

For example, Riak used this structure long ago, all our applications at Mochi are like this too.

Now, if we add a rel/ dir, do 'rebar create-node', include 'myapp' into reltool.config and try doing 'rebar generate', reltool will fail, since the root dir isn't listed in {lib_dirs, ...}.

To fix this, I create a temporary directory "myapp" in the deps/ dir, make symlinks to the root directory's files and directories (except the deps/ dir) and run reltool.
When we are cleaning the "rel" dir, we also remove this directory with symlinks.

The disadvantage – this will work on UNIX platforms only.