2022-04-21 22:55:16 +02:00
|
|
|
if [[ -z "${CI}" ]]; then
|
|
|
|
echo 'Cannot run insall.sh unless in CI'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
BRANCH=$1
|
2022-04-21 23:12:57 +02:00
|
|
|
BASE_BRANCH=$2
|
2022-04-21 22:55:16 +02:00
|
|
|
|
|
|
|
cd ../
|
|
|
|
echo "Cloning pro repo..."
|
|
|
|
git clone git@github.com:Budibase/budibase-pro.git
|
|
|
|
cd budibase-pro
|
|
|
|
|
|
|
|
# Try to checkout the matching pro branch
|
|
|
|
git checkout $BRANCH
|
2022-04-21 23:12:57 +02:00
|
|
|
# Try to checkout the matching pro base (master or develop) branch
|
|
|
|
git checkout $BASE_BRANCH
|
|
|
|
# If neither branch exists continue with default branch 'develop'
|
2022-04-21 22:55:16 +02:00
|
|
|
git pull
|
|
|
|
|
|
|
|
echo "Initializing pro repo..."
|
|
|
|
yarn setup
|