Sha256: 3fe356f7a16515d44e9d691aa31867d19ed4e9499ac2a4cd65e22d5a1245432b

Contents?: true

Size: 912 Bytes

Versions: 2

Compression:

Stored size: 912 Bytes

Contents

require 'papa/task/base'
require 'papa/command/git/branch'
require 'papa/command/git/push'
require 'papa/command/git/reset_hard'

module Papa
  module Task
    module Common
      class Start < Base
        private

        def queue
          [
            Command::Git::Fetch.new('origin'),
            Command::Git::Checkout.new(@base_branch),
            Command::Git::ResetHard.new('origin', @base_branch),
            Command::Git::Branch.new(build_branch),
            Command::Git::Checkout.new(build_branch),
            Command::Git::Push.new('origin', build_branch)
          ]
        end

        def success_message
          Helper::Output.success "Successfully started new #{@build_type} branch #{build_branch}"
        end

        def failure_message
          Helper::Output.failure "There was a problem starting #{@build_type} branch: #{build_branch}"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
papa-1.2.0 lib/papa/task/common/start.rb
papa-1.1.0 lib/papa/task/common/start.rb