Sha256: 5bf35403cd828290cfa3122ecafae7abaf7803adcf58ef92083004c265619244

Contents?: true

Size: 1.02 KB

Versions: 19

Compression:

Stored size: 1.02 KB

Contents

require 'optparse'
require_relative 'base'

module VagrantPlugins
  module Invade
    module Command
      class Build < Base
        def execute
          options = {}
          opts = OptionParser.new do |o|
            o.banner = "Usage: vagrant invade build [-f|--force] [-q|--quiet] [-h]"
            o.separator ""
            o.on("-f", "--force", "Overwrite existing Vagrantfile") do |f|
              options[:force] = f
            end
            o.on("-q", "--quiet", "No verbose output.") do |q|
              options[:quiet] = q
            end
          end

          # Parse the options
          argv = parse_options(opts)
          return if !argv

          # Validates InVaDE configuration
          action(Action.build, {
            :invade_build_force => options[:force],
            :invade_build_quiet => options[:quiet],
            :invade_validate_quiet => true # set this to true. Just build without validate output
          })

          # Success, exit status 0
          0
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
vagrant-invade-0.5.5 lib/vagrant-invade/command/build.rb
vagrant-invade-0.5.4 lib/vagrant-invade/command/build.rb
vagrant-invade-0.5.3 lib/vagrant-invade/command/build.rb
vagrant-invade-0.5.2 lib/vagrant-invade/command/build.rb
vagrant-invade-0.5.1 lib/vagrant-invade/command/build.rb
vagrant-invade-0.5.0 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.8 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.7 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.6 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.5 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.4 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.3 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.2 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.1 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.0 lib/vagrant-invade/command/build.rb
vagrant-invade-0.4.0.pre.alpha lib/vagrant-invade/command/build.rb
vagrant-invade-0.3.4 lib/vagrant-invade/command/build.rb
vagrant-invade-0.3.3 lib/vagrant-invade/command/build.rb
vagrant-invade-0.3.2 lib/vagrant-invade/command/build.rb