Created
February 18, 2012 17:16
-
-
Save gregbell/1860249 to your computer and use it in GitHub Desktop.
Active Admin: run-tests-on-fork
This file contains 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 | |
set -e | |
# Run the script: | |
# ./active-admin-run-tests-on-fork GITHUBUSERNAME BRANCHNAME | |
# Change this to wherever you want tests to run | |
tests_dir=~/code/personal/active_admin_forks | |
user=$1 | |
branch=$2 | |
user_tests_dir="$tests_dir/$user" | |
branch_test_dir="$user_tests_dir/$branch" | |
if [ ! -d $user_tests_dir ]; then | |
mkdir -p $user_tests_dir | |
fi | |
( | |
cd $user_tests_dir | |
if [ -d $branch ]; then | |
rm -rf $branch | |
fi | |
git clone "git://github.com/$user/active_admin.git" $branch | |
cd $branch | |
if [ $branch != "master" ]; then | |
echo "Checking out $branch" | |
git checkout -b $branch "origin/$branch" | |
fi | |
rvm use ree@activeadmin | |
./script/use_rails 3.0.10 | |
./script/use_rails 3.1.0 | |
bundle exec rake test:major_supported_rails | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment