102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# File 'lib/wordmove/cli.rb', line 102
def push
ensure_wordpress_options_presence!(options)
begin
deployer = Wordmove::Deployer::Base.deployer_for(options.deep_symbolize_keys)
rescue MovefileNotFound => e
logger.error(e.message)
exit 1
end
Wordmove::Hook.run(:push, :before, options)
guardian = Wordmove::Guardian.new(options: options, action: :push)
handle_options(options) do |task|
deployer.send("push_#{task}") if guardian.allows(task.to_sym)
end
Wordmove::Hook.run(:push, :after, options)
end
|