Link pro only when it exists locally

This commit is contained in:
adrinr 2023-04-19 10:09:12 +01:00
parent 279e2b723c
commit cfbb25449d
1 changed files with 14 additions and 6 deletions

View File

@ -34,11 +34,19 @@ yarn unlink
yarn link
cd -
echo "Linking pro"
cd packages/pro/packages/pro
yarn unlink
yarn link
cd -
if [ -d packages/pro/packages ]; then
pro_loaded_locally=true
else
pro_loaded_locally=false
fi
if [ $pro_loaded_locally = true ]; then
echo "Linking pro"
cd packages/pro/packages/pro
yarn unlink
yarn link
cd -
fi
if [ -d "../account-portal" ]; then
cd ../account-portal
@ -55,7 +63,7 @@ if [ -d "../account-portal" ]; then
echo "Linking types to account-portal"
yarn link "@budibase/types"
if [ -d "../../../budibase-pro" ]; then
if [ $pro_loaded_locally = true ]; then
echo "Linking pro to account-portal"
yarn link "@budibase/pro"
fi