ci: adjust whitelist of release script
This commit is contained in:
@@ -10,19 +10,8 @@ export type PackageDetails = {
|
|||||||
version: string
|
version: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const whitelist3_0 = [
|
export const getPackageDetails = async (packages: string[]): Promise<PackageDetails[]> => {
|
||||||
'payload',
|
const packageDirs = fse.readdirSync(packagesDir).filter((d) => packages.includes(d))
|
||||||
'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))
|
|
||||||
|
|
||||||
const packageDetails = await Promise.all(
|
const packageDetails = await Promise.all(
|
||||||
packageDirs.map(async (dirName) => {
|
packageDirs.map(async (dirName) => {
|
||||||
|
|||||||
@@ -13,6 +13,18 @@ import simpleGit from 'simple-git'
|
|||||||
import { getPackageDetails } from './lib/getPackageDetails'
|
import { getPackageDetails } from './lib/getPackageDetails'
|
||||||
import { updateChangelog } from './utils/updateChangelog'
|
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 rootPath = path.resolve(__dirname, '..')
|
||||||
|
|
||||||
const git = simpleGit(rootPath)
|
const git = simpleGit(rootPath)
|
||||||
@@ -21,10 +33,10 @@ const execOpts: ExecSyncOptions = { stdio: 'inherit' }
|
|||||||
const args = minimist(process.argv.slice(2))
|
const args = minimist(process.argv.slice(2))
|
||||||
|
|
||||||
const {
|
const {
|
||||||
bump = 'patch',
|
bump = 'patch', // Semver release type
|
||||||
changelog = false,
|
changelog = false, // Whether to update the changelog. WARNING: This gets throttled on too many commits
|
||||||
'dry-run': dryRun,
|
'dry-run': dryRun,
|
||||||
'git-tag': gitTag = false,
|
'git-tag': gitTag = false, // Whether to run git tag and commit operations
|
||||||
tag = 'latest',
|
tag = 'latest',
|
||||||
} = args
|
} = args
|
||||||
|
|
||||||
@@ -90,7 +102,7 @@ async function main() {
|
|||||||
return // For TS type checking
|
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(`\n Version: ${monorepoVersion} => ${chalk.green(nextReleaseVersion)}\n`))
|
||||||
console.log(chalk.bold.yellow(` Bump: ${bump}`))
|
console.log(chalk.bold.yellow(` Bump: ${bump}`))
|
||||||
|
|||||||
Reference in New Issue
Block a user