Release 0.3.1 (#4031)

This commit is contained in:
Charles Bochet
2024-02-16 20:11:38 +01:00
committed by GitHub
parent 1b983b005d
commit ba050cd33d
5 changed files with 19 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "twenty-docs", "name": "twenty-docs",
"version": "0.3.0", "version": "0.3.1",
"private": true, "private": true,
"scripts": { "scripts": {
"nx": "NX_DEFAULT_PROJECT=twenty-docs node ../../node_modules/nx/bin/nx.js", "nx": "NX_DEFAULT_PROJECT=twenty-docs node ../../node_modules/nx/bin/nx.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "twenty-emails", "name": "twenty-emails",
"version": "0.3.0", "version": "0.3.1",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,

View File

@ -1,6 +1,6 @@
{ {
"name": "twenty-front", "name": "twenty-front",
"version": "0.3.0", "version": "0.3.1",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@ -1,6 +1,6 @@
{ {
"name": "twenty-server", "name": "twenty-server",
"version": "0.3.0", "version": "0.3.1",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,

View File

@ -1,23 +1,30 @@
const fs = require("fs"); const fs = require('fs');
const semver = require("semver"); const semver = require('semver');
const path = require("path"); const path = require('path');
// Get the version argument from the command line // Get the version argument from the command line
const [, , version] = process.argv; const [, , version] = process.argv;
if (!semver.valid(version)) { if (!semver.valid(version)) {
console.error( console.error(
"Invalid version. The format should be X.X.X where X is a positive integer (or 0)." 'Invalid version. The format should be X.X.X where X is a positive integer (or 0).',
); );
process.exit(1); process.exit(1);
} }
const FrontPackageJson = path.join(__dirname, "../twenty-front/package.json"); const frontPackageJson = path.join(__dirname, '../twenty-front/package.json');
const ServerPackageJson = path.join(__dirname, "../twenty-server/package.json"); const serverPackageJson = path.join(__dirname, '../twenty-server/package.json');
const docsPackageJson = path.join(__dirname, '../twenty-docs/package.json');
const emailPackageJson = path.join(__dirname, '../twenty-emails/package.json');
// Update package.json // Update package.json
for (let file of [FrontPackageJson, ServerPackageJson]) { for (let file of [
frontPackageJson,
serverPackageJson,
docsPackageJson,
emailPackageJson,
]) {
let pkgdata = JSON.parse(fs.readFileSync(file)); let pkgdata = JSON.parse(fs.readFileSync(file));
pkgdata.version = version; pkgdata.version = version;
fs.writeFileSync(file, JSON.stringify(pkgdata, null, 2), "utf8"); fs.writeFileSync(file, JSON.stringify(pkgdata, null, 2), 'utf8');
} }