Created
November 25, 2016 09:20
-
-
Save hjanuschka/3040fc6f371f46acff72a5e67f649b27 to your computer and use it in GitHub Desktop.
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 | |
FORK=$1 | |
BRANCH=$2 | |
CMD=$3 | |
shift 3 | |
REST=$* | |
PR_FOLDER="/tmp/pr-try-${FORK}-${BRANCH}" | |
# check for bundler | |
type -a bundler 2>&1 | |
if [ $? != 0 ] | |
then | |
echo "you need to have bundler installed" | |
exit 2 | |
fi | |
if [ -d $PR_FOLDER ] | |
then | |
echo "Wipe previous try" | |
rm -fr $PR_FOLDER | |
fi | |
# 1. Clone PR | |
git clone -b $BRANCH https://github.com/$FORK/fastlane "${PR_FOLDER}" | |
echo "Cloning PR: $PR" | |
echo "Running: $CMD $REST" | |
export BUNDLE_GEMFILE="${PR_FOLDER}/Gemfile" | |
# use all gems from source folder | |
export FASTLANE_LOCAL_DEV=1 | |
echo "launching fork" | |
bundle update | |
bundle exec $CMD $REST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run it with:
./try_pr.sh hjanuschka deliver_pkg fastlane env
./try_pr.sh hjanuschka deliver_pkg deliver
and so on