Sha256: 1aac3a1b1f57392c72c5968a14831dd58a5ca584314bf85926354c55f32cbff8

Contents?: true

Size: 1.27 KB

Versions: 140

Compression:

Stored size: 1.27 KB

Contents

require 'alpha_omega/deploy/strategy/base'

module Capistrano
  module Deploy
    module Strategy

      # An abstract superclass, which forms the base for all deployment
      # strategies which work by grabbing the code from the repository directly
      # from remote host.
      class Remote < Base
        # Executes the SCM command for this strategy and writes the REVISION
        # mark file to each host.
        def deploy!
          commands.each do |command|
            run command
          end
          run mark
        end

        def check!
          super.check do |d|
            d.remote.command(source.command)
          end
        end

        protected

          # An abstract method which must be overridden in subclasses, to
          # return the actual SCM command(s) which must be executed on each
          # target host in order to perform the deployment.
          def commands
            raise NotImplementedError, "`command' is not implemented by #{self.class.name}"
          end

          # Returns the command which will write the identifier of the
          # revision being deployed to the REVISION file on each host.
          def mark
            "echo #{revision} > #{configuration[:deploy_release]}/REVISION"
          end
      end

    end
  end
end

Version data entries

140 entries across 140 versions & 1 rubygems

Version Path
alpha_omega-1.5.15 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.14 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.12 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.10 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.9 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.8 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.7 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.6 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.2.1 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.4 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.3 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.2 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.1 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.5.0 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.48 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.47 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.46 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.45 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.44 lib/alpha_omega/deploy/strategy/remote.rb
alpha_omega-1.3.43 lib/alpha_omega/deploy/strategy/remote.rb