ci: adjust whitelist of release script

This commit is contained in:
Elliot DeNolf
2024-03-04 09:51:22 -05:00
parent 44a7a5e692
commit 5b86a8d7c9
2 changed files with 18 additions and 17 deletions

View File

@@ -10,19 +10,8 @@ export type PackageDetails = {
version: string
}
const whitelist3_0 = [
'payload',
'translations',
'ui',
'next',
'graphql',
'db-mongodb',
'richtext-slate',
]
export const getPackageDetails = async (): Promise<PackageDetails[]> => {
const packageDirs = fse.readdirSync(packagesDir).filter((d) => whitelist3_0.includes(d))
export const getPackageDetails = async (packages: string[]): Promise<PackageDetails[]> => {
const packageDirs = fse.readdirSync(packagesDir).filter((d) => packages.includes(d))
const packageDetails = await Promise.all(
packageDirs.map(async (dirName) => {

View File

@@ -13,6 +13,18 @@ import simpleGit from 'simple-git'
import { getPackageDetails } from './lib/getPackageDetails'
import { updateChangelog } from './utils/updateChangelog'
// Update this list with any packages to publish
const packageWhitelist = [
'payload',
'translations',
'ui',
'next',
'graphql',
'db-mongodb',
'richtext-slate',
]
const rootPath = path.resolve(__dirname, '..')
const git = simpleGit(rootPath)
@@ -21,10 +33,10 @@ const execOpts: ExecSyncOptions = { stdio: 'inherit' }
const args = minimist(process.argv.slice(2))
const {
bump = 'patch',
changelog = false,
bump = 'patch', // Semver release type
changelog = false, // Whether to update the changelog. WARNING: This gets throttled on too many commits
'dry-run': dryRun,
'git-tag': gitTag = false,
'git-tag': gitTag = false, // Whether to run git tag and commit operations
tag = 'latest',
} = args
@@ -90,7 +102,7 @@ async function main() {
return // For TS type checking
}
const packageDetails = await getPackageDetails()
const packageDetails = await getPackageDetails(packageWhitelist)
console.log(chalk.bold(`\n Version: ${monorepoVersion} => ${chalk.green(nextReleaseVersion)}\n`))
console.log(chalk.bold.yellow(` Bump: ${bump}`))