mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-23 22:12:24 +03:00
44d046b363
* Move dockerignore file away from root
* Delete Twenty CLI
* Create Twenty-utils
* Move release script
* Add danger.js to yarn
* Add danger
* Add Bot token
* Cancel previous steps CI
* Revert "Move dockerignore file away from root"
This reverts commit 7ed17bb2bc
.
24 lines
724 B
JavaScript
24 lines
724 B
JavaScript
const fs = require("fs");
|
|
const semver = require("semver");
|
|
const path = require("path");
|
|
|
|
// Get the version argument from the command line
|
|
const [, , version] = process.argv;
|
|
|
|
if (!semver.valid(version)) {
|
|
console.error(
|
|
"Invalid version. The format should be X.X.X where X is a positive integer (or 0)."
|
|
);
|
|
process.exit(1);
|
|
}
|
|
|
|
const FrontPackageJson = path.join(__dirname, "../../front/package.json");
|
|
const ServerPackageJson = path.join(__dirname, "../../server/package.json");
|
|
|
|
// Update package.json
|
|
for (let file of [FrontPackageJson, ServerPackageJson]) {
|
|
let pkgdata = JSON.parse(fs.readFileSync(file));
|
|
pkgdata.version = version;
|
|
fs.writeFileSync(file, JSON.stringify(pkgdata, null, 2), "utf8");
|
|
}
|