lib/middleman-deploy/extension.rb in middleman-deploy-0.0.6 vs lib/middleman-deploy/extension.rb in middleman-deploy-0.0.7
- old
+ new
@@ -3,11 +3,11 @@
# Extension namespace
module Middleman
module Deploy
- class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :path, :clean, :remote, :branch); end
+ class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :password, :path, :clean, :remote, :branch, :after_build); end
class << self
def options
@@options
@@ -19,9 +19,15 @@
options.port ||= 22
options.clean ||= false
options.remote ||= "origin"
options.branch ||= "gh-pages"
+
+ options.after_build ||= false
+
+ app.after_build do |builder|
+ ::Middleman::Cli::Deploy.new.deploy if options.after_build
+ end
@@options = options
app.send :include, Helpers
end