Sha256: b7fe51bb2495dcaf24ff50cbfc94bc248a79f9df78ad812acef407719edda2e0

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

require 'heroku/api'
require 'anvil/engine'
require 'active_support/core_ext/object/blank'
require 'rrrretry'
require 'repl_runner'

require 'json'
require 'stringio'
require 'fileutils'
require 'stringio'


module Hatchet
  RETRIES = Integer(ENV['HATCHET_RETRIES'] || 1)

  class App
  end

  def self.git_branch
    return ENV['TRAVIS_BRANCH'] if ENV['TRAVIS_BRANCH']
    out = `git describe --contains --all HEAD`.strip
    raise "Attempting to find current branch name. Error: Cannot describe git: #{out}" unless $?.success?
    out
  end

  def self.set_deploy_strategy!
    deploy_strat = (ENV['HATCHET_DEPLOY_STRATEGY'] || :anvil).to_sym
    case Hatchet::const_set("DEPLOY_STRATEGY", deploy_strat)
    when :anvil
      Hatchet.const_set("Runner", Hatchet::AnvilApp)
    when :git
      Hatchet.const_set("Runner", Hatchet::GitApp)
    else
      raise "unknown deploy strategy #{Hatchet::DEPLOY_STRATEGY}, expected 'anvil', 'git'"
    end
  end
end

require 'hatchet/version'
require 'hatchet/app'
require 'hatchet/anvil_app'
require 'hatchet/git_app'
require 'hatchet/config'


Hatchet.set_deploy_strategy!

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
heroku_hatchet-1.3.2 lib/hatchet.rb
heroku_hatchet-1.3.1 lib/hatchet.rb
heroku_hatchet-1.3.0 lib/hatchet.rb
heroku_hatchet-1.2.1 lib/hatchet.rb
heroku_hatchet-1.2.0 lib/hatchet.rb
heroku_hatchet-1.1.9 lib/hatchet.rb