diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index e03768a420..bd10833f91 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -34,3 +34,14 @@ jobs: CI: true name: Budibase CI - run: yarn test:e2e:ci + + - name: Build and Push Staging Docker Image + # Only run on push + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + yarn build:docker:staging + env: + DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} + diff --git a/hosting/scripts/linux/release-to-docker-hub.sh b/hosting/scripts/linux/release-to-docker-hub.sh index b1921916e4..1661fed9f0 100755 --- a/hosting/scripts/linux/release-to-docker-hub.sh +++ b/hosting/scripts/linux/release-to-docker-hub.sh @@ -1,9 +1,15 @@ #!/bin/bash + +tag=$1 +tag=${tag:-latest} + pushd ../../build docker-compose build --force app-service docker-compose build --force worker-service -docker tag build_app-service budibase/budibase-apps:latest + +docker tag build_app-service budibase/budibase-apps:$tag +docker tag build_worker-service budibase/budibase-worker:$tag + docker push budibase/budibase-apps -docker tag build_worker-service budibase/budibase-worker:latest docker push budibase/budibase-worker popd diff --git a/lerna.json b/lerna.json index 22963e707b..640c262a36 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.5.3", + "version": "0.6.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/package.json b/package.json index 37efca51ba..037e9c4b1c 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "format": "prettier --write \"{,!(node_modules)/**/}*.{js,jsx,svelte}\"", "test:e2e": "lerna run cy:test", "test:e2e:ci": "lerna run cy:ci", - "build:docker": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -" + "build:docker": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh && cd -", + "build:docker:staging": "cd hosting/scripts/linux/ && ./release-to-docker-hub.sh staging && cd -" } } diff --git a/packages/builder/package.json b/packages/builder/package.json index 117a0b5d66..440215d65c 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.5.3", + "version": "0.6.2", "license": "AGPL-3.0", "private": true, "scripts": { @@ -63,10 +63,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.55.1", - "@budibase/client": "^0.5.3", + "@budibase/bbui": "^1.55.2", + "@budibase/client": "^0.6.2", "@budibase/colorpicker": "^1.0.1", - "@budibase/string-templates": "^0.5.3", + "@budibase/string-templates": "^0.6.2", "@budibase/svelte-ag-grid": "^0.0.16", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "^0.7.0", diff --git a/packages/builder/src/analytics.js b/packages/builder/src/analytics.js index f59d71ac30..c68f228c12 100644 --- a/packages/builder/src/analytics.js +++ b/packages/builder/src/analytics.js @@ -106,6 +106,16 @@ function highlightFeedbackIcon() { return isFeedbackTimeElapsed(firstRunStr) } +// Opt In/Out +const ifAnalyticsEnabled = func => () => { + if (analyticsEnabled && process.env.POSTHOG_TOKEN) { + return func() + } +} +const disabled = () => posthog.has_opted_out_capturing() +const optIn = () => posthog.opt_in_capturing() +const optOut = () => posthog.opt_out_capturing() + export default { activate, identify, @@ -115,4 +125,7 @@ export default { requestFeedbackOnDeploy, submitFeedback, highlightFeedbackIcon, + disabled: ifAnalyticsEnabled(disabled), + optIn: ifAnalyticsEnabled(optIn), + optOut: ifAnalyticsEnabled(optOut), } diff --git a/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte b/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte index 8855fb6895..50e7346876 100644 --- a/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/SchemaSetup.svelte @@ -43,6 +43,7 @@ - {/each} - + {/each} + {#if schema.customisable} {#if config} -
-
Query type: {config[query.queryVerb].type}
-
- -
+
+
+ Query type: + {config[query.queryVerb].type} +
+
+ +
- + {/if} @@ -164,7 +169,7 @@
@@ -182,7 +187,11 @@ {#each fields as field, idx}
- +