Skip to content

Commit

Permalink
Tools: Fixed /setupNewRelease script
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Jul 11, 2022
1 parent 5ffe90c commit ed4a013
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/tools/setupNewRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
}
}
}
Expand Down Expand Up @@ -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);
Expand All @@ -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) => {
Expand Down

0 comments on commit ed4a013

Please sign in to comment.