class Egads::Release

Public Instance Methods

restart() click to toggle source
# File lib/egads/command/release.rb, line 26
def restart
  return unless should_release?

  inside release_to do
    # Restart services
    run_with_code(RemoteConfig.restart_command, stream: true)
  end
end
run_after_release_hooks() click to toggle source
# File lib/egads/command/release.rb, line 35
def run_after_release_hooks
  inside release_to do
    run_hooks_for(:release, :after)
  end
end
run_before_release_hooks() click to toggle source
# File lib/egads/command/release.rb, line 16
def run_before_release_hooks
  return unless should_release?
  inside(dir) { run_hooks_for(:release, :before) }
end
setup_environment() click to toggle source
# File lib/egads/command/release.rb, line 8
def setup_environment
  RemoteConfig.setup_environment
end
stage() click to toggle source
# File lib/egads/command/release.rb, line 12
def stage
  invoke(Egads::Stage, [sha], options)
end
trim() click to toggle source
# File lib/egads/command/release.rb, line 41
def trim
  FileUtils.touch(dir) # Ensure this release isn't trimmed
  invoke(Egads::Trim, [4], {})
end

Protected Instance Methods

dir() click to toggle source
# File lib/egads/command/release.rb, line 47
def dir
  RemoteConfig.release_dir(sha)
end
release_to() click to toggle source
# File lib/egads/command/release.rb, line 51
def release_to
  RemoteConfig.release_to
end
should_release?() click to toggle source
# File lib/egads/command/release.rb, line 59
def should_release?
  @should_release = options[:force] || dir != current_symlink_destination unless defined?(@should_release)
  @should_release
end