#!/usr/bin/env bash

REQUIRED_CONFIGS+=(HOSTS)
OPTIONAL_CONFIGS+=(SUPERVISOR)

# Sincer deliver leverages foreman,
# it supports all the supervisors that foreman does
if [ -z "$SUPERVISOR" ]
then
  SUPERVISOR="upstart"
fi

run() {
  authorize_hosts
  init_app_remotely
  git_push
  git_reset_remote
  authorize_remote_hosts
  git_submodules
  npm_install
  foreman_export
  upstart
}
