chore(script): update release script [skip ci]

This commit is contained in:
Elliot DeNolf
2023-10-17 17:00:14 -04:00
parent fa1740d906
commit f50a392d59
2 changed files with 7 additions and 2 deletions

View File

@@ -33,7 +33,8 @@ export const getPackageDetails = async (): Promise<PackageDetails[]> => {
const publishedVersion = json?.['dist-tags']?.latest
const publishDate = json?.time?.[publishedVersion]
const prevGitTag = `${dirName}/${packageJson.version}`
const prevGitTag =
dirName === 'payload' ? `v${packageJson.version}` : `${dirName}/${packageJson.version}`
const prevGitTagHash = await git.revparse(prevGitTag)
const newCommits = await git.log({

View File

@@ -92,9 +92,13 @@ ${packagesToRelease
const newVersion = packageObj.version
const tagName = `${shortName}/${newVersion}`
execSync(`git commit -m "chore(release): ${tagName}"`, execOpts)
execSync(`git commit -m "chore(release): ${tagName} [skip ci]" `, execOpts)
execSync(`git tag -a ${tagName} -m "${tagName}"`, execOpts)
if (pkg === 'payload') {
execSync(`git tag -a v${newVersion} -m "v${newVersion}"`, execOpts)
}
let publishCmd = `pnpm publish -C ${packagePath} --no-git-checks`
if (tag !== 'latest') {
publishCmd += ` --tag ${tag}`