Sha256: 69f8637b15d45ff525459eb29a01223eeb6f61a409c3392b166a11a04927da48

Contents?: true

Size: 756 Bytes

Versions: 6

Compression:

Stored size: 756 Bytes

Contents

module Pushwagner

  class Main
    def initialize(opts = {})
      @environment = Pushwagner::Environment.new(opts)
    end

    def set_environment(env)
      @environment.current = env.to_s
    end

    def set_version(version)
      @environment.version = version.to_s
    end

    def deploy(opts = {})
      Pushwagner.info "Starting deployment to environment: #{@environment.current}"
      @environment.hosts.each { |h| Pushwagner.info "  - #{@environment.user}@#{h}" }
      
      pw_hooks = Hooks.new(@environment)
      pw_hooks.run(:before)

      Maven::Deployer.new(@environment, opts).deploy if @environment.maven?
      Static::Deployer.new(@environment, opts).deploy if @environment.static?

      pw_hooks.run(:after)
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pushwagner-0.0.2.2 lib/pushwagner/main.rb
pushwagner-0.0.2.1 lib/pushwagner/main.rb
pushwagner-0.0.2.0 lib/pushwagner/main.rb
pushwagner-0.0.1.12 lib/pushwagner/main.rb
pushwagner-0.0.1.11 lib/pushwagner/main.rb
pushwagner-0.0.1.10 lib/pushwagner/main.rb