mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(monorepo): adapt update nightly for client & server
This commit is contained in:
parent
15bba955fd
commit
a271e57ac1
@ -26,10 +26,7 @@ function processVersion(version) {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function patchPackageJson(packageJsonPath) {
|
||||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
||||||
const packageJsonPath = join(scriptDir, "..", "package.json");
|
|
||||||
|
|
||||||
// Read the version from package.json and process it.
|
// Read the version from package.json and process it.
|
||||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
||||||
const currentVersion = packageJson.version;
|
const currentVersion = packageJson.version;
|
||||||
@ -43,4 +40,16 @@ function main() {
|
|||||||
fs.writeFileSync(packageJsonPath, formattedJson);
|
fs.writeFileSync(packageJsonPath, formattedJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
|
const rootPackageJson = join(scriptDir, "..", "package.json");
|
||||||
|
patchPackageJson(rootPackageJson);
|
||||||
|
|
||||||
|
for (const app of ["server", "client"]) {
|
||||||
|
const appPackageJsonPath = join(scriptDir, "..", "apps", app, "package.json");
|
||||||
|
patchPackageJson(appPackageJsonPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user