Created
July 27, 2011 17:48
-
-
Save ylg/1109963 to your computer and use it in GitHub Desktop.
Setting up a PC for and deploying to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [[ ! -e "./Procfile" ]]; then | |
| echo "Oops, there's no Procfile in this directory--your developer should have included one--check you're in the application's root directory." | |
| echo "...aborting script." | |
| exit | |
| fi | |
| echo "Updating Ruby's own package manager" | |
| gem update --system --no-ri --no-rdoc | |
| echo "Installing Heroku tools, info at http://devcenter.heroku.com/categories/command-line" | |
| gem install heroku --no-ri --no-rdoc | |
| if [[ ! -e "${HOME}/.ssh/id_rsa" ]]; then | |
| echo "You don't have an SSH key yet, let's create one. Be sure to specify a good password." | |
| ssh-keygen -t rsa | |
| fi | |
| if [[ ! -e "./.git" ]]; then | |
| echo "Setting your app up with Git." | |
| git init | |
| git add -A | |
| git commit -m "Initial Git Setup." | |
| fi | |
| echo "Now let's create your app profile on Heroku; you'll need to tell Heroku your username and password" | |
| heroku auth:login | |
| wait ${!} | |
| heroku create --stack cedar | |
| echo "Deploying your app onto Heroku." | |
| git push heroku master | |
| heroku info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment