Sha256: 1b50038044f3271a4e494f9ed07e85730a0b08174e0f25f2d60280d0a72455d8
Contents?: true
Size: 1.2 KB
Versions: 4
Compression:
Stored size: 1.2 KB
Contents
#!/usr/bin/env ruby lib = File.expand_path(File.dirname(__FILE__) + '/../lib') $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib) require 'rubygems' require 'optparse' require 'shuttle' config_name = Dir.pwd.split('/').last + ".yml" options = { :path => File.join(ENV['HOME'], '.shuttle', config_name), :target => 'production', :log => false } optparse = OptionParser.new do |opts| opts.on('-v', '--version', 'Show version') do puts "Shuttle version #{Shuttle::VERSION}" exit 0 end opts.on('-e', '--environment NAME', 'Deployment target environment') do |v| options[:target] = v end opts.on('-d', '--debug', 'Enable debugging') do options[:log] = true end opts.on('-f', '--file PATH', 'Configuration file path') do |v| options[:path] = v end end begin optparse.parse! rescue OptionParser::ParseError => e puts "Error: #{e.message}" exit 1 end case ARGV.size when 2 options[:target] = ARGV.shift command = ARGV.shift when 1 command = ARGV.shift else puts "Command required" exit 1 end begin runner = Shuttle::Runner.new(options) runner.execute(command.dup) rescue Shuttle::ConfigError => err puts "Error: #{err.message}." end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
shuttle-deploy-0.2.0.beta4 | bin/shuttle |
shuttle-deploy-0.2.0.beta3 | bin/shuttle |
shuttle-deploy-0.2.0.beta2 | bin/shuttle |
shuttle-deploy-0.2.0.beta1 | bin/shuttle |