Update publish-new.ts

This commit is contained in:
Steve Ruiz 2023-06-26 16:46:59 +01:00
parent caaedc559f
commit 79539f9ac3

View file

@ -5,6 +5,7 @@ import { parse } from 'semver'
import { exec } from './lib/exec' import { exec } from './lib/exec'
import { nicelog } from './lib/nicelog' import { nicelog } from './lib/nicelog'
import { getLatestVersion, publish, setAllVersions } from './lib/publishing' import { getLatestVersion, publish, setAllVersions } from './lib/publishing'
import { getAllWorkspacePackages } from './lib/workspace'
async function main() { async function main() {
const huppyToken = process.env.HUPPY_TOKEN const huppyToken = process.env.HUPPY_TOKEN
@ -50,7 +51,13 @@ async function main() {
setAllVersions(nextVersion) setAllVersions(nextVersion)
// stage the changes // 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 // this creates a new commit
await auto.changelog({ await auto.changelog({