Merge pull request #10360 from Budibase/chore/pipeline_npm_version_updates
Chore - Pipeline npm version updates
This commit is contained in:
commit
fb25ced4cd
|
@ -3,19 +3,14 @@ concurrency: release-prerelease
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- ".aws/**"
|
||||
- ".github/**"
|
||||
- "charts/**"
|
||||
- "packages/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
tags:
|
||||
- v*-alpha.*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: "Release tag"
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
# Posthog token used by ui at build time
|
||||
|
@ -30,24 +25,38 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if branch is not develop
|
||||
if: github.ref != 'refs/heads/develop'
|
||||
run: |
|
||||
echo "Ref is not develop, you must run this job from develop."
|
||||
exit 1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Fail if tag is not develop
|
||||
run: |
|
||||
if ! git merge-base --is-ancestor ${{ github.sha }} origin/develop; then
|
||||
echo "Tag is not in develop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
- run: yarn
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
yarn
|
||||
- run: yarn bootstrap
|
||||
- run: yarn build
|
||||
- run: yarn build:sdk
|
||||
# - run: yarn test
|
||||
|
||||
- name: Publish budibase packages to NPM
|
||||
env:
|
||||
|
@ -56,6 +65,8 @@ jobs:
|
|||
# setup the username and email.
|
||||
git config --global user.name "Budibase Staging Release Bot"
|
||||
git config --global user.email "<>"
|
||||
git submodule foreach git commit -a -m 'Release process'
|
||||
git commit -a -m 'Release process'
|
||||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
||||
yarn release:develop
|
||||
|
||||
|
@ -84,7 +95,7 @@ jobs:
|
|||
git config user.name "Budibase Helm Bot"
|
||||
git config user.email "<>"
|
||||
git reset --hard
|
||||
git pull
|
||||
git fetch
|
||||
mkdir sync
|
||||
echo "Packaging chart to sync dir"
|
||||
helm package charts/budibase --version 0.0.0-develop --app-version develop --destination sync
|
||||
|
|
|
@ -3,29 +3,16 @@ concurrency: release
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- ".aws/**"
|
||||
- ".github/**"
|
||||
- "charts/**"
|
||||
- "packages/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
# Exclude all pre-releases
|
||||
- '!v*[0-9]+.[0-9]+.[0-9]+-*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
versioning:
|
||||
type: choice
|
||||
description: "Versioning type: patch, minor, major"
|
||||
default: patch
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
tags:
|
||||
description: "Release tag"
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
# Posthog token used by ui at build time
|
||||
|
@ -38,20 +25,35 @@ jobs:
|
|||
release-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
// Change to "exit 1" when merged. Left to 0 to not fail all the pipelines and not to cause noise
|
||||
exit 0
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
- run: yarn
|
||||
- name: Update versions
|
||||
run: |
|
||||
version=$(cat lerna.json \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
|
||||
| sed 's/[",]//g')
|
||||
echo "Setting version $version"
|
||||
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
|
||||
node scripts/syncLocalDependencies.js $version
|
||||
yarn
|
||||
- run: yarn bootstrap
|
||||
- run: yarn lint
|
||||
- run: yarn build
|
||||
|
@ -65,6 +67,8 @@ jobs:
|
|||
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
|
||||
git config --global user.name "Budibase Release Bot"
|
||||
git config --global user.email "<>"
|
||||
git submodule foreach git commit -a -m 'Release process'
|
||||
git commit -a -m 'Release process'
|
||||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
||||
yarn release
|
||||
|
||||
|
@ -103,7 +107,7 @@ jobs:
|
|||
git config user.name "Budibase Helm Bot"
|
||||
git config user.email "<>"
|
||||
git reset --hard
|
||||
git pull
|
||||
git fetch
|
||||
mkdir sync
|
||||
echo "Packaging chart to sync dir"
|
||||
helm package charts/budibase --version 0.0.0-master --app-version v"$RELEASE_VERSION" --destination sync
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
name: Tag prerelease
|
||||
concurrency: release-prerelease
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- ".aws/**"
|
||||
- ".github/**"
|
||||
- "charts/**"
|
||||
- "packages/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tag-prerelease:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if branch is not develop
|
||||
if: github.ref != 'refs/heads/develop'
|
||||
run: |
|
||||
echo "Ref is not develop, you must run this job from develop."
|
||||
exit 1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
- name: Tag prerelease
|
||||
run: |
|
||||
# setup the username and email.
|
||||
git config --global user.name "Budibase Staging Release Bot"
|
||||
git config --global user.email "<>"
|
||||
./scripts/versionCommit.sh alpha
|
|
@ -0,0 +1,48 @@
|
|||
name: Tag prerelease
|
||||
concurrency: release-prerelease
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- ".aws/**"
|
||||
- ".github/**"
|
||||
- "charts/**"
|
||||
- "packages/**"
|
||||
- "scripts/**"
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
versioning:
|
||||
type: choice
|
||||
description: "Versioning type: patch, minor, major"
|
||||
default: patch
|
||||
options:
|
||||
- patch
|
||||
- minor
|
||||
- major
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
tag-prerelease:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fail if branch is not master
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
echo "Ref is not master, you must run this job from master."
|
||||
exit 1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
- name: Tag prerelease
|
||||
run: |
|
||||
# setup the username and email.
|
||||
git config --global user.name "Budibase Staging Release Bot"
|
||||
git config --global user.email "<>"
|
||||
./scripts/versionCommit.sh ${{ github.event.inputs.versioning }}
|
|
@ -21,6 +21,7 @@
|
|||
"typescript": "4.7.3"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node scripts/syncProPackage.js",
|
||||
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn bootstrap && yarn build && yarn dev",
|
||||
"bootstrap": "./scripts/bootstrap.sh && lerna link && ./scripts/link-dependencies.sh",
|
||||
"build": "lerna run --stream build",
|
||||
|
@ -29,8 +30,8 @@
|
|||
"backend:build": "./scripts/scopeBackend.sh 'lerna run --stream build'",
|
||||
"build:sdk": "lerna run --stream build:sdk",
|
||||
"deps:circular": "madge packages/server/dist/index.js packages/worker/src/index.ts packages/backend-core/dist/src/index.js packages/cli/src/index.js --circular",
|
||||
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish && yarn release:pro",
|
||||
"release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop --exact && yarn release:pro:develop",
|
||||
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish --no-git-tag-version --no-push --no-git-reset",
|
||||
"release:develop": "lerna publish from-package --yes --force-publish --dist-tag develop --exact --no-git-tag-version --no-push --no-git-reset",
|
||||
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
|
||||
"nuke": "yarn run nuke:packages && yarn run nuke:docker",
|
||||
"nuke:packages": "yarn run restore",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase backend core libraries used in server and worker",
|
||||
"main": "dist/src/index.js",
|
||||
"types": "dist/src/index.d.ts",
|
||||
|
@ -22,7 +22,7 @@
|
|||
"dependencies": {
|
||||
"@budibase/nano": "10.1.2",
|
||||
"@budibase/pouchdb-replication-stream": "1.2.10",
|
||||
"@budibase/types": "2.5.10-alpha.0",
|
||||
"@budibase/types": "0.0.1",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-cloudfront-sign": "2.2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"module": "dist/bbui.es.js",
|
||||
|
@ -38,8 +38,8 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
||||
"@budibase/shared-core": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/shared-core": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@spectrum-css/accordion": "3.0.24",
|
||||
"@spectrum-css/actionbutton": "1.0.1",
|
||||
"@spectrum-css/actiongroup": "1.0.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -58,10 +58,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.5.10-alpha.0",
|
||||
"@budibase/frontend-core": "2.5.10-alpha.0",
|
||||
"@budibase/shared-core": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/bbui": "0.0.1",
|
||||
"@budibase/frontend-core": "0.0.1",
|
||||
"@budibase/shared-core": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
@ -29,9 +29,9 @@
|
|||
"outputPath": "build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/types": "2.5.10-alpha.0",
|
||||
"@budibase/backend-core": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@budibase/types": "0.0.1",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"license": "MPL-2.0",
|
||||
"module": "dist/budibase-client.js",
|
||||
"main": "dist/budibase-client.js",
|
||||
|
@ -19,11 +19,11 @@
|
|||
"dev:builder": "rollup -cw"
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.5.10-alpha.0",
|
||||
"@budibase/frontend-core": "2.5.10-alpha.0",
|
||||
"@budibase/shared-core": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/types": "2.5.10-alpha.0",
|
||||
"@budibase/bbui": "0.0.1",
|
||||
"@budibase/frontend-core": "0.0.1",
|
||||
"@budibase/shared-core": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@budibase/types": "0.0.1",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.5.10-alpha.0",
|
||||
"@budibase/shared-core": "2.5.10-alpha.0",
|
||||
"@budibase/bbui": "0.0.1",
|
||||
"@budibase/shared-core": "0.0.1",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash": "^4.17.21",
|
||||
"socket.io-client": "^4.6.1",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 89b236619d6f3b76dc3e733f9cad215db2d8994f
|
||||
Subproject commit 616aa3ae4b13c65a4630be2126f86cda0fcec071
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/sdk",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase Public API SDK",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase Web Server",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -45,12 +45,12 @@
|
|||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "10.0.3",
|
||||
"@budibase/backend-core": "2.5.10-alpha.0",
|
||||
"@budibase/client": "2.5.10-alpha.0",
|
||||
"@budibase/pro": "2.5.10-alpha.0",
|
||||
"@budibase/shared-core": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/types": "2.5.10-alpha.0",
|
||||
"@budibase/backend-core": "0.0.1",
|
||||
"@budibase/client": "0.0.1",
|
||||
"@budibase/pro": "0.0.1",
|
||||
"@budibase/shared-core": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@budibase/types": "0.0.1",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/shared-core",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Shared data utils",
|
||||
"main": "dist/cjs/src/index.js",
|
||||
"types": "dist/mjs/src/index.d.ts",
|
||||
|
@ -20,7 +20,7 @@
|
|||
"dev:builder": "yarn prebuild && concurrently \"tsc -p tsconfig.build.json --watch\" \"tsc -p tsconfig-cjs.build.json --watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/types": "2.5.10-alpha.0"
|
||||
"@budibase/types": "0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^7.6.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/mjs/index.d.ts",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.5.10-alpha.0",
|
||||
"version": "0.0.1",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -37,10 +37,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.5.10-alpha.0",
|
||||
"@budibase/pro": "2.5.10-alpha.0",
|
||||
"@budibase/string-templates": "2.5.10-alpha.0",
|
||||
"@budibase/types": "2.5.10-alpha.0",
|
||||
"@budibase/backend-core": "0.0.1",
|
||||
"@budibase/pro": "0.0.1",
|
||||
"@budibase/string-templates": "0.0.1",
|
||||
"@budibase/types": "0.0.1",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
const fs = require("fs")
|
||||
|
||||
const filePath = "lerna.json"
|
||||
const versionBump = process.argv[2] || "patch"
|
||||
|
||||
// Read and parse lerna.json file
|
||||
const fileData = fs.readFileSync(filePath)
|
||||
const lernaData = JSON.parse(fileData)
|
||||
|
||||
// Get current version and split into major, minor, patch, and alpha components
|
||||
const currentVersion = lernaData.version
|
||||
const [versionWithoutPrerelease, alpha] = currentVersion.split("-")
|
||||
const [major, minor, patch] = versionWithoutPrerelease.split(".").map(Number)
|
||||
|
||||
// Calculate new version based on specified version bump
|
||||
let newVersion = currentVersion
|
||||
switch (versionBump) {
|
||||
case "major":
|
||||
newVersion = `${major + 1}.0.0`
|
||||
break
|
||||
case "minor":
|
||||
newVersion = `${major}.${minor + 1}.0`
|
||||
break
|
||||
case "patch":
|
||||
newVersion = `${major}.${minor}.${patch + 1}`
|
||||
break
|
||||
case "alpha":
|
||||
let newAlphaVersion = 0
|
||||
if (alpha) {
|
||||
const [_, alphaVersion] = alpha.split(".")
|
||||
newAlphaVersion = +alphaVersion + 1
|
||||
}
|
||||
newVersion = `${versionWithoutPrerelease}-alpha.${newAlphaVersion}`
|
||||
|
||||
break
|
||||
default:
|
||||
console.error(`Invalid version bump '${versionBump}' specified.`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Update lerna.json file with new version
|
||||
lernaData.version = newVersion
|
||||
const updatedData = JSON.stringify(lernaData, null, 2)
|
||||
fs.writeFileSync(filePath, updatedData)
|
||||
|
||||
console.log(`Updated version from ${currentVersion} to ${newVersion}`)
|
|
@ -0,0 +1,53 @@
|
|||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const { execSync } = require("child_process")
|
||||
|
||||
// Get the version argument from the command line
|
||||
const version = process.argv[2]
|
||||
if (!version) {
|
||||
console.error("Usage: node update-workspace-dependencies.js <version>")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Get the list of workspaces with mismatched dependencies
|
||||
const output = execSync("yarn --silent workspaces info --json", {
|
||||
encoding: "utf-8",
|
||||
})
|
||||
const data = JSON.parse(output)
|
||||
|
||||
const workspaces = Object.keys(data).filter(key => {
|
||||
return data[key].mismatchedWorkspaceDependencies?.length
|
||||
})
|
||||
|
||||
// Loop through each workspace and update the dependencies
|
||||
workspaces.forEach(workspace => {
|
||||
const dependencies = data[workspace].mismatchedWorkspaceDependencies
|
||||
|
||||
// Loop through each dependency and update its version in package.json
|
||||
const packageJsonPath = path.join(data[workspace].location, "package.json")
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"))
|
||||
let hasChanges = false
|
||||
|
||||
dependencies.forEach(dependency => {
|
||||
if (packageJson.dependencies?.[dependency]) {
|
||||
packageJson.dependencies[dependency] = version
|
||||
hasChanges = true
|
||||
}
|
||||
if (packageJson.devDependencies?.[dependency]) {
|
||||
packageJson.devDependencies[dependency] = version
|
||||
hasChanges = true
|
||||
}
|
||||
if (packageJson.peerDependencies?.[dependency]) {
|
||||
packageJson.peerDependencies[dependency] = version
|
||||
hasChanges = true
|
||||
}
|
||||
})
|
||||
|
||||
// Write changes to package.json if there are any
|
||||
if (hasChanges) {
|
||||
fs.writeFileSync(
|
||||
packageJsonPath,
|
||||
JSON.stringify(packageJson, null, 2) + "\n"
|
||||
)
|
||||
}
|
||||
})
|
|
@ -0,0 +1,43 @@
|
|||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const { execSync } = require("child_process")
|
||||
|
||||
let version = "0.0.1"
|
||||
const localPro = fs.existsSync("packages/pro/packages")
|
||||
if (!localPro) {
|
||||
const branchName = execSync("git rev-parse --abbrev-ref HEAD")
|
||||
.toString()
|
||||
.trim()
|
||||
if (branchName === "master") {
|
||||
version = "latest"
|
||||
} else {
|
||||
version = "develop"
|
||||
}
|
||||
}
|
||||
|
||||
// Get the list of workspaces with mismatched dependencies
|
||||
const output = execSync("yarn --silent workspaces info --json", {
|
||||
encoding: "utf-8",
|
||||
})
|
||||
const data = JSON.parse(output)
|
||||
|
||||
// Loop through each workspace and update the dependencies
|
||||
Object.keys(data).forEach(workspace => {
|
||||
// Loop through each dependency and update its version in package.json
|
||||
const packageJsonPath = path.join(data[workspace].location, "package.json")
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"))
|
||||
let hasChanges = false
|
||||
|
||||
if (packageJson.dependencies["@budibase/pro"]) {
|
||||
packageJson.dependencies["@budibase/pro"] = version
|
||||
hasChanges = true
|
||||
}
|
||||
|
||||
// Write changes to package.json if there are any
|
||||
if (hasChanges) {
|
||||
fs.writeFileSync(
|
||||
packageJsonPath,
|
||||
JSON.stringify(packageJson, null, 2) + "\n"
|
||||
)
|
||||
}
|
||||
})
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Error: version number is required. Usage: $0 [major|minor|patch|alpha]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Bump the version in lerna.json
|
||||
node scripts/bumpVersion.js $1
|
||||
|
||||
|
||||
NEW_VERSION=$(node -p "require('./lerna.json').version")
|
||||
git add lerna.json
|
||||
git commit -m "Bump version to $NEW_VERSION"
|
||||
git tag v$NEW_VERSION
|
||||
git push
|
||||
git push --tags
|
115
yarn.lock
115
yarn.lock
|
@ -1386,45 +1386,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.5.6-alpha.26":
|
||||
version "2.5.6-alpha.26"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.5.6-alpha.26.tgz#72029afe5a85402fa996e92b84ad56cb8c6bde45"
|
||||
integrity sha512-ktP2SWwLjaDzJYLnadU1BcZlrfQkvhRb3T+v1SEciTBWi0vF7MUa7k5OW0EKwECpGA3VA576sbI7FgGu7m7Sxw==
|
||||
dependencies:
|
||||
"@budibase/nano" "10.1.2"
|
||||
"@budibase/pouchdb-replication-stream" "1.2.10"
|
||||
"@budibase/types" "2.5.6-alpha.26"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-cloudfront-sign "2.2.0"
|
||||
aws-sdk "2.1030.0"
|
||||
bcrypt "5.0.1"
|
||||
bcryptjs "2.4.3"
|
||||
bull "4.10.1"
|
||||
correlation-id "4.0.0"
|
||||
dotenv "16.0.1"
|
||||
emitter-listener "1.1.2"
|
||||
ioredis "4.28.0"
|
||||
joi "17.6.0"
|
||||
jsonwebtoken "9.0.0"
|
||||
koa-passport "4.1.4"
|
||||
koa-pino-logger "4.0.0"
|
||||
lodash "4.17.21"
|
||||
lodash.isarguments "3.1.0"
|
||||
node-fetch "2.6.7"
|
||||
passport-google-oauth "2.0.0"
|
||||
passport-jwt "4.0.0"
|
||||
passport-local "1.0.0"
|
||||
passport-oauth2-refresh "^2.1.0"
|
||||
posthog-node "1.3.0"
|
||||
pouchdb "7.3.0"
|
||||
pouchdb-find "7.2.2"
|
||||
redlock "4.2.0"
|
||||
sanitize-s3-objectkey "0.0.1"
|
||||
semver "7.3.7"
|
||||
tar-fs "2.1.1"
|
||||
uuid "8.3.2"
|
||||
|
||||
"@budibase/bbui@^0.9.139":
|
||||
version "0.9.190"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81"
|
||||
|
@ -1525,39 +1486,6 @@
|
|||
pouchdb-promise "^6.0.4"
|
||||
through2 "^2.0.0"
|
||||
|
||||
"@budibase/pro@2.5.10-alpha.0":
|
||||
version "2.5.10-alpha.0"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.10-alpha.0.tgz#f3688cc61d2130fbf8b191e515b8ac9789f2a9df"
|
||||
integrity sha512-vYa1F4NhMh7veSZyhgrE54iziwZLHiuRwXbU+unEo3xqyFZIvERAAQZ88nrnwssubWBWnPhpN/8JMHrsyM8mXg==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.5.10-alpha.0"
|
||||
"@budibase/shared-core" "2.5.9"
|
||||
"@budibase/string-templates" "2.5.9"
|
||||
"@budibase/types" "2.5.10-alpha.0"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
jsonwebtoken "8.5.1"
|
||||
lru-cache "^7.14.1"
|
||||
memorystream "^0.3.1"
|
||||
node-fetch "^2.6.1"
|
||||
scim-patch "^0.7.0"
|
||||
scim2-parse-filter "^0.2.8"
|
||||
|
||||
"@budibase/shared-core@2.4.44-alpha.1":
|
||||
version "2.4.44-alpha.1"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/shared-core/-/shared-core-2.4.44-alpha.1.tgz#3d499e40e7e6c646e13a87cd08e01ba116c2ff1d"
|
||||
integrity sha512-cN8LaDczijtsfWUYiXC4sg9Z+US4020i3Mb8TwCbf8TQyA1b06U5PwPCp+GHVA/wDFqfwcpcE1GXf8GwVuYs7A==
|
||||
dependencies:
|
||||
"@budibase/types" "2.4.44-alpha.1"
|
||||
|
||||
"@budibase/shared-core@2.5.9":
|
||||
version "2.5.9"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/shared-core/-/shared-core-2.5.9.tgz#f22f22637fb7618ded1c7292b10793d7969827ce"
|
||||
integrity sha512-l417Rb2+1tuXbjNL42wJHmqIQQyla2pPglOnapxfOdRuvzng+5GqlrTV1caLNf/53TS9U6ueGJdPOtxZTTFGUA==
|
||||
dependencies:
|
||||
"@budibase/types" "^2.5.9"
|
||||
|
||||
"@budibase/standard-components@^0.9.139":
|
||||
version "0.9.139"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/standard-components/-/standard-components-0.9.139.tgz#cf8e2b759ae863e469e50272b3ca87f2827e66e3"
|
||||
|
@ -1576,47 +1504,6 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
"@budibase/string-templates@2.4.44-alpha.1":
|
||||
version "2.4.44-alpha.1"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.4.44-alpha.1.tgz#6c2aee594d16eac1f173c509e087a817dd3172f0"
|
||||
integrity sha512-4gC2+0kccK0ilLnd0i/dmJzC0Ur7UgSAmV6zbzDDYNL4spU0qSy5VhBh7E3qKieg5RKMMzbpXLMWERpoPLlnqA==
|
||||
dependencies:
|
||||
"@budibase/handlebars-helpers" "^0.11.8"
|
||||
dayjs "^1.10.4"
|
||||
handlebars "^4.7.6"
|
||||
handlebars-utils "^1.0.6"
|
||||
lodash "^4.17.20"
|
||||
vm2 "^3.9.4"
|
||||
|
||||
"@budibase/string-templates@2.5.9":
|
||||
version "2.5.9"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-2.5.9.tgz#64582730421801e1e829b430136b449b1adc0314"
|
||||
integrity sha512-Szu06M0JFHuUVIil2aHZWU8hvsROYpDx9raX9uIv4DcwBOAtyvVzD16wOCHzlmj8wWeV8fbKe4JF4q4GXnilJg==
|
||||
dependencies:
|
||||
"@budibase/handlebars-helpers" "^0.11.8"
|
||||
dayjs "^1.10.4"
|
||||
handlebars "^4.7.6"
|
||||
handlebars-utils "^1.0.6"
|
||||
lodash "^4.17.20"
|
||||
vm2 "^3.9.15"
|
||||
|
||||
"@budibase/types@2.4.44-alpha.1":
|
||||
version "2.4.44-alpha.1"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.4.44-alpha.1.tgz#1679657aa180d9c59afa1dffa611bff0638bd933"
|
||||
integrity sha512-Sq+8HfM75EBMoOvKYFwELdlxmVN6wNZMofDjT/2G+9aF+Zfe5Tzw69C+unmdBgcGGjGCHEYWSz4mF0v8FPAGbg==
|
||||
|
||||
"@budibase/types@2.5.6-alpha.26":
|
||||
version "2.5.6-alpha.26"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.5.6-alpha.26.tgz#09ac8f1e4f4dfd5e7e109839cd9db36d5c563dc4"
|
||||
integrity sha512-C1eHWj4tRwsQb2dJbMdukxRFVqiyzRBhwIMuCSIdJg763sbn9TXTqWTBbljyG7ppH+Dwge+py9KtiFP2MpMCfQ==
|
||||
dependencies:
|
||||
scim-patch "^0.7.0"
|
||||
|
||||
"@budibase/types@^2.5.9":
|
||||
version "2.5.9"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.5.9.tgz#4b1253e76b95cd8d6a42e86ebc3363a305c62653"
|
||||
integrity sha512-7NELdWB3iV5y+pmXhm9g/v1AlN+wqHtoy67DZxKY5dlcK4DCcTdlqkToGiiw9d3sDPgDAVznjdZYnB5pGzd3TQ==
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.7.0.tgz#231f687187c0cb34e0b97f463917b6aaeb4ef6af"
|
||||
|
@ -24602,7 +24489,7 @@ vm2@3.9.17:
|
|||
acorn "^8.7.0"
|
||||
acorn-walk "^8.2.0"
|
||||
|
||||
vm2@^3.9.11, vm2@^3.9.15, vm2@^3.9.4:
|
||||
vm2@^3.9.11, vm2@^3.9.15:
|
||||
version "3.9.16"
|
||||
resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.16.tgz#0fbc2a265f7bf8b837cea6f4a908f88a3f93b8e6"
|
||||
integrity sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==
|
||||
|
|
Loading…
Reference in New Issue