chore: clean up release scripts and update version handling

This commit is contained in:
Adria Navarro
2026-08-24 16:54:26 +02:00
parent fdc3d9fb2b
commit bc9d2eb9ae
9 changed files with 8 additions and 66 deletions
-1
View File
@@ -9,7 +9,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends g++ make python
WORKDIR /app
COPY package.json .
COPY yarn.lock .
COPY lerna.json .
COPY .yarnrc .
COPY packages/server/package.json packages/server/package.json
+2 -2
View File
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "3.41.3",
"version": "independent",
"npmClient": "yarn",
"concurrency": 20,
"command": {
@@ -17,4 +17,4 @@
"loadEnvFiles": false
}
}
}
}
-1
View File
@@ -56,7 +56,6 @@
"check:unused-deps:fix": "yarn check:unused-deps --fix",
"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 from-package --yes --force-publish --no-git-tag-version --no-push --no-git-reset",
"pending-releases": "node scripts/pendingReleases.js",
"restore": "yarn run clean && yarn && yarn run build",
"nuke": "yarn run nuke:packages && yarn run nuke:docker",
+4 -11
View File
@@ -93,21 +93,14 @@ function getPackageJsonFields(): {
return parsedContent
}
let localVersion: string | undefined
if (isDev() && !isTest()) {
try {
const lerna = getParentFile("lerna.json")
localVersion = `${lerna.version}+local`
} catch {
//
}
}
try {
const parsedContent = getParentFile("package.json")
return {
VERSION:
localVersion || process.env.BUDIBASE_VERSION || parsedContent.version,
process.env.BUDIBASE_VERSION ||
(isDev() && !isTest()
? `${parsedContent.version}+local`
: parsedContent.version),
SERVICE_NAME: parsedContent.name,
}
} catch {
+1 -2
View File
@@ -1,11 +1,10 @@
#!/bin/bash
cd "$(dirname "$0")/.."
yarn build:apps
version=$(./scripts/getCurrentVersion.sh)
docker build \
-f hosting/single/Dockerfile \
-t budibase:latest \
--build-arg BUDIBASE_VERSION=$version \
--build-arg BUDIBASE_VERSION=0.0.0+local \
--build-arg TARGETBUILD=single \
.
-20
View File
@@ -1,20 +0,0 @@
const fs = require("fs")
const semver = require("semver")
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)
const currentVersion = lernaData.version
const newVersion = semver.inc(currentVersion, versionBump, "alpha")
// 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}`)
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
version=$(cat lerna.json \
| grep version \
| head -1 \
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
| sed 's/[",]//g')
echo $version
+1 -3
View File
@@ -1,8 +1,6 @@
#!/bin/bash
cd "$(dirname "$0")/.."
version=$(./scripts/getCurrentVersion.sh)
docker run -d \
--name budibase-single \
-p 80:80 \
@@ -18,7 +16,7 @@ docker run -d \
-e DEPLOYMENT_ENVIRONMENT="docker" \
-e SELF_HOSTED="1" \
-e NODE_ENV="production" \
-e BUDIBASE_VERSION=$version \
-e BUDIBASE_VERSION=0.0.0+local \
budibase:latest
echo "Budibase single image is running. Access it at http://localhost:80"
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
set -euo pipefail
if [ -z "${1:-}" ]
then
echo "Error: bump type is required. Usage: $0 [major|minor|patch|prerelease]"
exit 1
fi
# Bump the version in lerna.json
node ./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 $NEW_VERSION
git push
git push --tags