Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (52 sloc) 1.71 KB
heroku_name = app_name.gsub('_','')
gem 'heroku', group: :development
after_everything do
if config['create']
say_wizard "Creating Heroku app '#{heroku_name}'"
# system "heroku apps:destroy --app #{heroku_name} --confirm #{heroku_name}"
while !system("heroku create #{heroku_name}")
heroku_name = ask_wizard("What do you want to call your app? ")
if config['staging']
staging_name = "#{heroku_name}-staging"
say_wizard "Creating staging Heroku app '#{staging_name}'"
while !system("heroku create #{staging_name}")
staging_name = ask_wizard("What do you want to call your staging app?")
git :remote => "rm heroku"
git :remote => "add production{heroku_name}.git"
git :remote => "add staging{staging_name}.git"
say_wizard "Created branches 'production' and 'staging' for Heroku deploy."
unless config['domain'].blank?
run "heroku addons:add custom_domains"
run "heroku domains:add #{config['domain']}"
git :push => "#{config['staging'] ? 'staging' : 'heroku'} master" if config['deploy']
name: Heroku
description: Create Heroku application and instantly deploy.
author: mbleigh
requires: [git]
run_after: [git]
exclusive: deployment
category: deployment
tags: [provider]
- create:
prompt: "Automatically create"
type: boolean
- staging:
prompt: "Create staging app? ("
type: boolean
if: create
- domain:
prompt: "Specify custom domain (or leave blank):"
type: string
if: create
- deploy:
prompt: "Deploy immediately?"
type: boolean
if: create
Something went wrong with that request. Please try again.