From 7354886c6e88cf312ef25c05d814878365cbd294 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 22 Apr 2022 11:01:27 +0100 Subject: [PATCH 1/6] Release script updates --- package.json | 4 ++-- scripts/pro/release.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b605c419ff..e1f1752864 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "build": "lerna run build", "release": "lerna publish patch --yes --force-publish && yarn release:pro", "release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop && yarn release:pro:develop", - "release:pro": "sh scripts/pro/release.sh", - "release:pro:develop": "sh scripts/pro/release.sh develop", + "release:pro": "bash scripts/pro/release.sh", + "release:pro:develop": "bash scripts/pro/release.sh develop", "restore": "yarn run clean && yarn run bootstrap && yarn run build", "nuke": "yarn run nuke:packages && yarn run nuke:docker", "nuke:packages": "yarn run restore", diff --git a/scripts/pro/release.sh b/scripts/pro/release.sh index 6023de7f16..885f45a665 100755 --- a/scripts/pro/release.sh +++ b/scripts/pro/release.sh @@ -29,6 +29,12 @@ echo "Releasing version $VERSION" echo "Releasing tag $TAG" lerna publish $VERSION --yes --force-publish --dist-tag $TAG +# reset main and types to point to src for dev +jq '.main = "src/index.ts" | .types = "src/index.ts"' package.json > package.json.tmp && mv package.json.tmp package.json +git add package.json +git commit -m 'Prep dev' +git push + cd - if [[ $COMMAND == "develop" ]]; then From 6c1bfb0d84c697febd2665bf3d51ddf6d0770d30 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 22 Apr 2022 10:11:20 +0000 Subject: [PATCH 2/6] v1.0.105-alpha.31 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 3c3b56bf83..eb0767141a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 6fdafea9de..589dfece42 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 5e8c431855..e3cdb4822f 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.105-alpha.30", + "@budibase/string-templates": "^1.0.105-alpha.31", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index d56f60405d..e0974b3a4e 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.30", - "@budibase/client": "^1.0.105-alpha.30", - "@budibase/frontend-core": "^1.0.105-alpha.30", - "@budibase/string-templates": "^1.0.105-alpha.30", + "@budibase/bbui": "^1.0.105-alpha.31", + "@budibase/client": "^1.0.105-alpha.31", + "@budibase/frontend-core": "^1.0.105-alpha.31", + "@budibase/string-templates": "^1.0.105-alpha.31", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 2abdee2bb2..a3fe21e1d8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 06ed092726..a3b2a1ec04 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.30", - "@budibase/frontend-core": "^1.0.105-alpha.30", - "@budibase/string-templates": "^1.0.105-alpha.30", + "@budibase/bbui": "^1.0.105-alpha.31", + "@budibase/frontend-core": "^1.0.105-alpha.31", + "@budibase/string-templates": "^1.0.105-alpha.31", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index c99add81d6..59efee7b74 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.30", + "@budibase/bbui": "^1.0.105-alpha.31", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 0e05c1d2e0..09c9f03b51 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.105-alpha.30", - "@budibase/client": "^1.0.105-alpha.30", + "@budibase/backend-core": "^1.0.105-alpha.31", + "@budibase/client": "^1.0.105-alpha.31", "@budibase/pro": "^1.0.0", - "@budibase/string-templates": "^1.0.105-alpha.30", + "@budibase/string-templates": "^1.0.105-alpha.31", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 9ad7d25bf7..fe67760b2d 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 819373cebb..81256d541d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.105-alpha.30", + "version": "1.0.105-alpha.31", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.105-alpha.30", + "@budibase/backend-core": "^1.0.105-alpha.31", "@budibase/pro": "^1.0.0", - "@budibase/string-templates": "^1.0.105-alpha.30", + "@budibase/string-templates": "^1.0.105-alpha.31", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From a736c507d1ffebe2dbbcb7e787354006cc40f81b Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 22 Apr 2022 11:37:55 +0100 Subject: [PATCH 3/6] Update release script --- package.json | 2 +- scripts/pro/release.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e1f1752864..3e6290e40b 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,6 @@ "mode:account": "yarn mode:cloud && yarn env:account:enable", "security:audit": "node scripts/audit.js", "postinstall": "husky install", - "install:pro": "sh ./scripts/pro/install.sh" + "install:pro": "bash scripts/pro/install.sh" } } diff --git a/scripts/pro/release.sh b/scripts/pro/release.sh index 885f45a665..d4a471727b 100755 --- a/scripts/pro/release.sh +++ b/scripts/pro/release.sh @@ -30,8 +30,10 @@ echo "Releasing tag $TAG" lerna publish $VERSION --yes --force-publish --dist-tag $TAG # reset main and types to point to src for dev +cd packages/pro jq '.main = "src/index.ts" | .types = "src/index.ts"' package.json > package.json.tmp && mv package.json.tmp package.json -git add package.json +cd ../../ +git add packages/pro/package.json git commit -m 'Prep dev' git push From 8a711cb7366a5c8c711b298440d8f44704569066 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 22 Apr 2022 11:45:45 +0100 Subject: [PATCH 4/6] Skip pro install on community forks --- scripts/pro/install.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/scripts/pro/install.sh b/scripts/pro/install.sh index ffa123a821..074d1773cf 100755 --- a/scripts/pro/install.sh +++ b/scripts/pro/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ -z "${CI}" ]]; then +if [[ -z "${CI}" ]] then echo 'Cannot run insall.sh unless in CI' exit 0 fi @@ -11,14 +11,21 @@ BASE_BRANCH=$2 cd ../ echo "Cloning pro repo..." git clone https://$PERSONAL_ACCESS_TOKEN@github.com/Budibase/budibase-pro.git -cd budibase-pro -# Try to checkout the matching pro branch -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 +# Community forks won't be able to clone the pro repo as they can't access secrets +# Skip the rest of the installation and rely on npm version instead +# This should be ok as forks will not rely on pro changes +if [ -d "budibase-pro" ] +then + cd budibase-pro -echo "Initializing pro repo..." -yarn setup + # Try to checkout the matching pro branch + 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..." + yarn setup +fi \ No newline at end of file From 39de3f300d8a826e3bcf2623c957853e1bd5b6c8 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 22 Apr 2022 11:49:15 +0100 Subject: [PATCH 5/6] Bash updates --- scripts/pro/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/pro/install.sh b/scripts/pro/install.sh index 074d1773cf..cd1682d651 100755 --- a/scripts/pro/install.sh +++ b/scripts/pro/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ -z "${CI}" ]] then +if [[ -z "${CI}" ]]; then echo 'Cannot run insall.sh unless in CI' exit 0 fi @@ -15,8 +15,7 @@ git clone https://$PERSONAL_ACCESS_TOKEN@github.com/Budibase/budibase-pro.git # Community forks won't be able to clone the pro repo as they can't access secrets # Skip the rest of the installation and rely on npm version instead # This should be ok as forks will not rely on pro changes -if [ -d "budibase-pro" ] -then +if [[ -d "budibase-pro" ]]; then cd budibase-pro # Try to checkout the matching pro branch From bd32fae00f09e82a8c82144e946e2e6a89b2f6ca Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Fri, 22 Apr 2022 10:58:15 +0000 Subject: [PATCH 6/6] v1.0.105-alpha.32 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index eb0767141a..5965a54b80 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 589dfece42..66a5a9d95b 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index e3cdb4822f..f23cad9217 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.105-alpha.31", + "@budibase/string-templates": "^1.0.105-alpha.32", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index e0974b3a4e..3c218b85e7 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "license": "GPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.31", - "@budibase/client": "^1.0.105-alpha.31", - "@budibase/frontend-core": "^1.0.105-alpha.31", - "@budibase/string-templates": "^1.0.105-alpha.31", + "@budibase/bbui": "^1.0.105-alpha.32", + "@budibase/client": "^1.0.105-alpha.32", + "@budibase/frontend-core": "^1.0.105-alpha.32", + "@budibase/string-templates": "^1.0.105-alpha.32", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index a3fe21e1d8..46dbcdf91b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index a3b2a1ec04..8f47119898 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.31", - "@budibase/frontend-core": "^1.0.105-alpha.31", - "@budibase/string-templates": "^1.0.105-alpha.31", + "@budibase/bbui": "^1.0.105-alpha.32", + "@budibase/frontend-core": "^1.0.105-alpha.32", + "@budibase/string-templates": "^1.0.105-alpha.32", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 59efee7b74..727318fc50 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.105-alpha.31", + "@budibase/bbui": "^1.0.105-alpha.32", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 09c9f03b51..ae60c70fe7 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.105-alpha.31", - "@budibase/client": "^1.0.105-alpha.31", + "@budibase/backend-core": "^1.0.105-alpha.32", + "@budibase/client": "^1.0.105-alpha.32", "@budibase/pro": "^1.0.0", - "@budibase/string-templates": "^1.0.105-alpha.31", + "@budibase/string-templates": "^1.0.105-alpha.32", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fe67760b2d..2739a0e37e 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 81256d541d..3c3db5a5d4 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.105-alpha.31", + "version": "1.0.105-alpha.32", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.105-alpha.31", + "@budibase/backend-core": "^1.0.105-alpha.32", "@budibase/pro": "^1.0.0", - "@budibase/string-templates": "^1.0.105-alpha.31", + "@budibase/string-templates": "^1.0.105-alpha.32", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0",