Last active
April 17, 2019 18:05
-
-
Save zdennis/0ce8fe07cd0d3dd76b12d8b9a3a1ebe1 to your computer and use it in GitHub Desktop.
Script to find which buildpack version was good starting from a known bad one
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
#!/bin/bash | |
PREV=146 # 146 is the currently known bad version | |
START=147 | |
STOP=149 | |
rails new zachs-sample-rails-app -d postgresql && | |
cd zachs-sample-rails-app && | |
\rm .git/hooks/pre-commit && | |
git add . && | |
git commit -m "initial commit" | |
for i in `seq $START $STOP` ; do | |
heroku create --remote heroku-cedar-14-$i --stack cedar-14 zachs-sample-rails-app-$i && | |
heroku config:set COMPILE_TASKS="assets:precompile" && | |
heroku buildpacks:add https://github.com/Genius/heroku-buildpack-compile-tasks -i 1 -a zachs-sample-rails-app-$i | |
heroku buildpacks:remove https://github.com/heroku/heroku-buildpack-ruby.git#v$PREV -a zachs-sample-rails-app-$i | |
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-ruby.git#v$i -i 1 -a zachs-sample-rails-app-$i | |
PREV=$i | |
git commit -m "buildpack v$i" --allow-empty && git push -f heroku-cedar-14-$i master | |
if [ $? != 0 ]; then | |
echo "buildpack v$i FAILED" | |
else | |
echo "buildpack v$i PASSED" | |
exit 0 | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment