Skip to content

Instantly share code, notes, and snippets.

@searls
Last active August 29, 2015 14:05
Show Gist options
  • Save searls/9a47eee96af71db2c7b9 to your computer and use it in GitHub Desktop.
Save searls/9a47eee96af71db2c7b9 to your computer and use it in GitHub Desktop.
Blindly upgrade from Heroku's Bamboo stack to Cedar stack
#!/bin/bash -e
PREV_PWD=`pwd`
mkdir -p "$HOME/tmp"
cd "$HOME/tmp"
echo "-----> Cloning into $1"
heroku git:clone -a $1
cd $1
echo "-----> Setting stack to cedar"
heroku stack:set cedar
echo "-----> Make a commit"
git commit -m "Upgrade to Heroku Cedar stack" --allow-empty
echo "-----> Deploying app"
git push
cd "$PREV_PWD"
@searls
Copy link
Author

searls commented Aug 25, 2014

I have a whole bunch of totally vanilla, default little toy apps on the bamboo stack and didn't feel like carefully walking through the lengthy Cedar Stack Migration Guide for each of them. So instead I just made this script executable and ran:

$ heroku-set-cedar try-jasmine

@stevenharman
Copy link

Rather than appending an empty space, what about

echo "-----> Making an arbitrary commit to push"
git commit -m "Upgrade to Heroku Cedar stack" --allow-empty

@searls
Copy link
Author

searls commented Aug 25, 2014

oh nice, I always forget about that flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment