Sha256: 1668b92177485fb5168f646a04e9f4bd1f341f90cbe4c9f2f70b6403e02e9899

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

module Octopress
  module Deploy
    class Commands < Octopress::Command
      def self.init_with_program(p)
        p.command(:deploy) do |c|
          c.syntax "octopress deploy [options]"
          c.description "Deploy your Octopress site."
          c.option "using", "--using METHOD", "Define the push method to use, overriding your configuration file's setting"
          c.option "config_file", "--config FILE", "The path to your config file (default: _deploy.yml)"
          c.option "init", "--init METHOD", "Initialize a config file with the options for the given method."
          c.option "pull", "--pull DIRECTORY", "Pull down the published copy of your site into a directory (default: ./site-pull)"

          c.action do |_, options|
            if options["init"] and options["init"].is_a?(String)
              Octopress::Deploy.init_config(options["init"], options)
            elsif options["pull"] and options["pull"].is_a?(String)
              Octopress::Deploy.pull(options["pull"], options)
            else
              Octopress::Deploy.push(options)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octopress-deploy-1.0.0.alpha.3 lib/octopress-deploy/commands.rb