diff --git a/scripts/publish-new.ts b/scripts/publish-new.ts index 2db30c6a9..d1cd74e3e 100644 --- a/scripts/publish-new.ts +++ b/scripts/publish-new.ts @@ -5,6 +5,7 @@ import { parse } from 'semver' import { exec } from './lib/exec' import { nicelog } from './lib/nicelog' import { getLatestVersion, publish, setAllVersions } from './lib/publishing' +import { getAllWorkspacePackages } from './lib/workspace' async function main() { const huppyToken = process.env.HUPPY_TOKEN @@ -50,7 +51,13 @@ async function main() { setAllVersions(nextVersion) // stage the changes - await exec('git', ['add', 'lerna.json', 'bublic/packages/*/package.json']) + const packageJsonFilesToAdd = [] + for (const workspace of await getAllWorkspacePackages()) { + if (workspace.relativePath.startsWith('packages/')) { + packageJsonFilesToAdd.push(`${workspace.relativePath}/package.json`) + } + } + await exec('git', ['add', 'lerna.json', ...packageJsonFilesToAdd]) // this creates a new commit await auto.changelog({