mina-deploy / mina

Blazing fast deployer and server automation tool

Home Page:https://rubygems.org/gems/mina

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't deploy to multiple machines after update

NicosKaralis opened this issue · comments

I have a deploy:all that invokes all stages (mina-multistage plugin) and invokes :deploy for each stage that no longer works

task :'deploy:all' do
  run(:local) do
    comment %{Deploying on all machines}
    comment %{Stages: #{fetch(:stages, ['No stages']).join(', ')}}
  end
  fetch(:stages, []).each do |stage|
    invoke stage
    comment %{Deploying #{stage} @ #{fetch(:domain, 'No domain')}}
    invoke :deploy
    run!
  end
end

This worked fine before on version 1.0.6, but now on version 1.2.2 it gives me this error:

! Can't use run block inside another run block. /Users/nicoskaralis/.rvm/gems/ruby-2.4.2@server/gems/rake-12.2.1/lib/rake/task.rb:251:inblock in execute'`

And I can also see that the :local block is being called before each deploy call

Am I doing something wrong? How can I update my code?

Will have to take a look at mina-multistage plugin but it looks like a bug