Browse Source

Skip pro install on community forks

master
Rory Powell 5 years ago
parent
commit
8a711cb736
  1. 27
      scripts/pro/install.sh

27
scripts/pro/install.sh

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [[ -z "${CI}" ]]; then if [[ -z "${CI}" ]] then
echo 'Cannot run insall.sh unless in CI' echo 'Cannot run insall.sh unless in CI'
exit 0 exit 0
fi fi
@ -11,14 +11,21 @@ BASE_BRANCH=$2
cd ../ cd ../
echo "Cloning pro repo..." echo "Cloning pro repo..."
git clone https://$PERSONAL_ACCESS_TOKEN@github.com/Budibase/budibase-pro.git git clone https://$PERSONAL_ACCESS_TOKEN@github.com/Budibase/budibase-pro.git
cd budibase-pro
# Try to checkout the matching pro branch # Community forks won't be able to clone the pro repo as they can't access secrets
git checkout $BRANCH # Skip the rest of the installation and rely on npm version instead
# Try to checkout the matching pro base (master or develop) branch # This should be ok as forks will not rely on pro changes
git checkout $BASE_BRANCH if [ -d "budibase-pro" ]
# If neither branch exists continue with default branch 'develop' then
git pull cd budibase-pro
echo "Initializing pro repo..." # Try to checkout the matching pro branch
yarn setup git checkout $BRANCH
# Try to checkout the matching pro base (master or develop) branch
git checkout $BASE_BRANCH
# If neither branch exists continue with default branch 'develop'
git pull
echo "Initializing pro repo..."
yarn setup
fi
Loading…
Cancel
Save