Custom remote task is not executed with capistrano 3

82 Views Asked by At

I run into a weird issue with capistrano 3 and brunch. I want to execute brunch on remote server but nothing happen. My custom remote task looks like this:

namespace :brunch do
    desc "Building assets with brunch.io"
    task :build do
        on roles(:web) do
            within "#{release_path}" do
                execute "node #{release_path}/node_modules/brunch/bin/brunch build --env=#{fetch(:stage)} #{release_path}"
            end
        end
    end
end

When I run "cap staging deploy", I can see command is executed:

INFO [a246858c] Running node /releases/20160303145521/node_modules/brunch/bin/brunch build --env=staging /releases/20160303145521 as web
INFO [a246858c] Finished in 0.159 seconds with exit status 0 (successful).

But my assets are not built, nothing is done. And if I connect on my server run command, everything works fine.

I don't understand this behaviour, is any one aware of that?

Thanks a lot for your help

I'm using Capistrano Version: 3.4.0 (Rake Version: 10.5.0)

0

There are 0 best solutions below