Skip to content

Commit 50f94dd

Browse files
committed
fix: publish script
1 parent e59b136 commit 50f94dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

post-build.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ postBuildScript({
66
srcDirName: 'src',
77
filesToCopy: ['LICENSE', 'README.md', 'assets'],
88
updateVersion: process.env.PUBLISH_VERSION,
9-
onPackageVersionChanged: (nextVersion, currVersion) => {
9+
onDone: (versionsDiff, _, packageJson, { targetPackageJson }) => {
1010
if (process.env.PUBLISH) {
1111
publishScript({
12-
nextVersion,
13-
currVersion,
12+
nextVersion: versionsDiff?.next ?? packageJson.version,
13+
currVersion: versionsDiff?.current,
1414
publishCommand: 'pnpm publish',
1515
commitAllCurrentChanges: true,
1616
createTag: true,
1717
githubRepoLink: 'https://github.com/js2me/mobx-tanstack-query',
1818
cleanupCommand: 'pnpm clean',
19+
targetPackageJson
1920
})
2021
}
2122
}

0 commit comments

Comments
 (0)