diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index c2f4b2a98a..7260272f2e 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -15,6 +15,8 @@ "prebuild": "rimraf dist/", "prepack": "cp package.json dist", "build": "tsc -p tsconfig.build.json", + "build:pro": "../../scripts/pro/build.sh", + "postbuild": "yarn run build:pro", "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput", "test": "jest --coverage --maxWorkers=2", "test:watch": "jest --watchAll" diff --git a/scripts/pro/build.sh b/scripts/pro/build.sh new file mode 100755 index 0000000000..b03d85a0d0 --- /dev/null +++ b/scripts/pro/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# This script is designed for building the pro repo after the backend-core build has completed. +# This ensures that any changes in core that are required by pro are done in the correct order. + +set -e + +# Go to parent of budibase +cd ../../../ + +if [[ -d "budibase-pro" ]]; then + cd budibase-pro + echo "Building pro" + yarn build +fi \ No newline at end of file diff --git a/scripts/pro/install.sh b/scripts/pro/install.sh index ee80bf9e0d..d6662d6341 100755 --- a/scripts/pro/install.sh +++ b/scripts/pro/install.sh @@ -35,5 +35,5 @@ if [[ -d "budibase-pro" ]]; then git pull echo "Initializing pro repo..." - yarn setup + yarn fi \ No newline at end of file