Sha256: 49ae19d5c9e08c351a7b6f7446aa2ec537fbd95641274dd682c533412a1919dc

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

#!/usr/bin/env ruby

require 'pushwagner'

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

# TODO: detect version requirement from config
version = 1 # ENV["VERSION"] || get_version

env = ARGV[1] || ENV['PW_ENV'] || 'production'

main = Pushwagner::Main.new(:config_file => 'config/deploy.yml', :version => version, :environment => env)

# TODO: detect cli from config
case ARGV[0]
  when "deploy"
    main.deploy
    main.restart

  when "restart"
    main.restart

  else
    puts "Usage: pw <deploy|restart> [environment]"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pushwagner-0.0.1.6 bin/pw