Skip to content

Commit

Permalink
Merge pull request #577 from mina-deploy/fix/prepending_envs
Browse files Browse the repository at this point in the history
Resolves #576
  • Loading branch information
d4be4st committed Oct 6, 2017
2 parents 3fa1f68 + 41c32ab commit a1865e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mina/commands.rb
Expand Up @@ -30,6 +30,10 @@ def delete(stage)
queue.delete(stage) || []
end

def empty(stage = :default)
queue[stage] = []
end

def process(path = nil)
if path
queue[stage].unshift(%{echo "$ cd #{path}"}) if fetch(:verbose)
Expand Down
4 changes: 4 additions & 0 deletions tasks/mina/default.rb
Expand Up @@ -17,7 +17,11 @@

task :run_commands do
if commands.run_default?
# all this so remote_environent is inserted in before all other commands
old_commands = commands.queue[:default]
commands.empty
invoke :remote_environment
commands.queue[:default] += old_commands
commands.run(:remote)
end
end
Expand Down

0 comments on commit a1865e1

Please sign in to comment.