Update pro install scripts with branch handling

This commit is contained in:
Rory Powell 2022-04-21 22:12:57 +01:00
parent cdb17748cb
commit 64a299064d
4 changed files with 11 additions and 4 deletions

View File

@ -14,6 +14,7 @@ on:
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
BASE_BRANCH: ${{ github.event.pull_request.base.ref}}
jobs:
build:
@ -32,7 +33,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install Pro
run: yarn install:pro
run: yarn install:pro $BRANCH $BASE_BRANCH
- run: yarn
- run: yarn bootstrap

View File

@ -31,7 +31,7 @@ jobs:
node-version: 14.x
- name: Install Pro
run: yarn install:pro
run: yarn install:pro develop
- run: yarn
- run: yarn bootstrap

View File

@ -30,6 +30,10 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install Pro
run: yarn install:pro master
- run: yarn
- run: yarn bootstrap
- run: yarn lint

View File

@ -4,16 +4,18 @@ if [[ -z "${CI}" ]]; then
fi
BRANCH=$1
BASE_BRANCH=$2
cd ../
echo "Cloning pro repo..."
git clone git@github.com:Budibase/budibase-pro.git
cd budibase-pro
echo "Checkout branch $BRANCH"
# Try to checkout the matching pro branch
# If branch does not exist we will continue with default branch 'develop'
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..."