Skip to content

Commit

Permalink
create an additional commit for major version update
Browse files Browse the repository at this point in the history
  • Loading branch information
uenoB committed Jul 20, 2024
1 parent 0c91954 commit 2b6ec55
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ for (const pkg of packages) {
hookPlugin(commitAnalyzer, pkg),
hookPlugin(notesGenerator, pkg),
hookPlugin(npm, { ...pkg, name: null }),
[hookPlugin(updateDependencies, pkg), { ...pkg, packageJsonList }],
[
hookPlugin(updateDependencies, pkg),
{ ...pkg, packageJsonList, major: false }
],
[
hookPlugin(git, { ...pkg, cwd: rootDir, name: null }),
{
Expand All @@ -44,6 +47,18 @@ for (const pkg of packages) {
nextRelease.notes %>`
}
],
[
hookPlugin(updateDependencies, pkg),
{ ...pkg, packageJsonList, major: true }
],
[
hookPlugin(git, { ...pkg, cwd: rootDir, name: null }),
{
assets: packageJsonList,
message: `fix: update ${pkg.name} to version <%=
nextRelease.version %>\n\n[skip ci]`
}
],
hookPlugin(github, pkg)
]
}
Expand Down
1 change: 1 addition & 0 deletions release/update-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const prepare = (pluginConfig, { nextRelease }) => {
// nothing to do if this is a prerelease.
if (nextRelease.channel != null) return
if (nextRelease.type.startsWith('pre')) return
if ((nextRelease.type === 'major') !== (pluginConfig.major === true)) return

const packageJsonList = pluginConfig.packageJsonList
const packageName = pluginConfig.json.name
Expand Down

0 comments on commit 2b6ec55

Please sign in to comment.