Tools: Fixed /setupNewRelease script

pull/6658/head
Laurent Cozic 2022-07-11 10:06:15 +01:00
parent 5ffe90c4b0
commit ed4a013cfc
1 changed files with 12 additions and 7 deletions

View File

@ -32,15 +32,19 @@ async function updatePackageVersion(packageFilePath: string, majorMinorVersion:
}
if (options.updateDependenciesVersion) {
for (const [name] of Object.entries(content.dependencies)) {
if (isJoplinPackage(name)) {
content.dependencies[name] = `~${majorMinorVersion}`;
if (content.dependencies) {
for (const [name] of Object.entries(content.dependencies)) {
if (isJoplinPackage(name)) {
content.dependencies[name] = `~${majorMinorVersion}`;
}
}
}
for (const [name] of Object.entries(content.devDependencies)) {
if (isJoplinPackage(name)) {
content.devDependencies[name] = `~${majorMinorVersion}`;
if (content.devDependencies) {
for (const [name] of Object.entries(content.devDependencies)) {
if (isJoplinPackage(name)) {
content.devDependencies[name] = `~${majorMinorVersion}`;
}
}
}
}
@ -125,6 +129,7 @@ async function main() {
await updatePackageVersion(`${rootDir}/packages/app-mobile/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/generator-joplin/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/htmlpack/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/react-native-saf-x/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/lib/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/plugin-repo-cli/package.json`, majorMinorVersion, options);
await updatePackageVersion(`${rootDir}/packages/renderer/package.json`, majorMinorVersion, options);
@ -138,7 +143,7 @@ async function main() {
await updatePluginGeneratorTemplateVersion(`${rootDir}/packages/generator-joplin/generators/app/templates/src/manifest.json`, majorMinorVersion);
}
console.info('Version numbers have been updated. Consider running `yarn i` to update the lock files');
console.info('Version numbers have been updated. Consider running `yarn install` to update the lock files');
}
main().catch((error) => {