Update pro install scripts with branch handling
This commit is contained in:
parent
cdb17748cb
commit
64a299064d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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..."
|
||||
|
|
Loading…
Reference in New Issue