Sha256: 26444b8ea12730aa7bbae5f350969e0df220654aee2b143d05b657362669b1c1

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

#!/usr/bin/env ruby

require 'pushwagner'
require 'pushwagner/version'
require 'optparse'
require 'ostruct'

def get_version
  Pushwagner.info "You must specify which version you wish to deploy"
  STDIN.gets.strip
end

options = OpenStruct.new
options.environment = 'default'
options.version = '1'
options.config_file = '.pw.yml'
options.command = 'todo'

OptionParser.new do |opts|
  opts.banner = 'Usage: pw <deploy> [options]'
  opts.on('deploy') { |v| options.command = 'deploy'}
  opts.on('-c FILE', 'Use config file') { |v| options.config_file = v }
  opts.on('-e ENV', 'Set environment') { |v| options.environment = v }
  opts.on('-V VERSION', 'Set version') { |v| options.version = v }
  opts.on('-v', '--version', 'Show version') { |v| puts Pushwagner::VERSION; exit }
  opts.on('-h', '--help', 'Show help') { |v| puts puts opts; exit }
end.parse!

main = Pushwagner::Main.new(options.to_h)

puts (
%q{
                 _
 _ __  _   _ ___| |____      ____ _  __ _ _ __   ___ _ __
| '_ \| | | / __| '_ \ \ /\ / / _` |/ _` | '_ \ / _ \ '__|
| |_) | |_| \__ \ | | \ V  V / (_| | (_| | | | |  __/ | _
| .__/ \__,_|___/_| |_|\_/\_/ \__,_|\__, |_| |_|\___|_|(oc)
|_|                                 |___/ }.colorize(color: :blue, mode: :bold) + 
 ('(' + Pushwagner::VERSION + ')').colorize(color: :cyan))
puts


case options.command
  when "deploy"
    main.deploy
  else
    Pushwagner.warning "Usage: pw <command> [options]"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pushwagner-0.0.2.6 bin/pw
pushwagner-0.0.2.5 bin/pw
pushwagner-0.0.2.4 bin/pw
pushwagner-0.0.2.3 bin/pw