From da53f0a3663e60d3c2f8edc37a29951deb8d6053 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 6 Oct 2023 14:32:17 +0200 Subject: [PATCH] Cache output files --- .github/workflows/release-singleimage-test.yml | 2 +- packages/builder/build/copy.js | 8 -------- packages/server/package.json | 8 +++++++- scripts/build-single-image.sh | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 packages/builder/build/copy.js diff --git a/.github/workflows/release-singleimage-test.yml b/.github/workflows/release-singleimage-test.yml index 584d8718cd..078355a654 100644 --- a/.github/workflows/release-singleimage-test.yml +++ b/.github/workflows/release-singleimage-test.yml @@ -50,7 +50,7 @@ jobs: - name: Run Yarn run: yarn - name: Run Yarn Build - run: yarn build --scope @budibase/builder --scope @budibase/server --scope @budibase/worker + run: yarn build --scope @budibase/server --scope @budibase/worker - name: Login to Docker Hub uses: docker/login-action@v2 with: diff --git a/packages/builder/build/copy.js b/packages/builder/build/copy.js deleted file mode 100644 index f3077b7854..0000000000 --- a/packages/builder/build/copy.js +++ /dev/null @@ -1,8 +0,0 @@ -const ncp = require("ncp").ncp - -ncp("./dist", "../server/builder", function (err) { - if (err) { - return console.error(err) - } - console.log("Copied dist folder to ../server/builder") -}) diff --git a/packages/server/package.json b/packages/server/package.json index 9cc19f0645..e6b8e31800 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -170,10 +170,16 @@ ] }, "build": { + "outputs": [ + "{projectRoot}/builder", + "{projectRoot}/client", + "{projectRoot}/dist" + ], "dependsOn": [ { "projects": [ - "@budibase/client" + "@budibase/client", + "@budibase/builder" ], "target": "build" } diff --git a/scripts/build-single-image.sh b/scripts/build-single-image.sh index d7302cc64d..a9abe8c8da 100755 --- a/scripts/build-single-image.sh +++ b/scripts/build-single-image.sh @@ -1,4 +1,4 @@ #!/bin/bash -yarn build --scope @budibase/builder --scope @budibase/server --scope @budibase/worker +yarn build --scope @budibase/server --scope @budibase/worker ./scripts/generatePackageNamesFile.sh docker build -f hosting/single/Dockerfile -t budibase:latest .