Skip to content

feat(release): add dist directory check for specific packages to optimize the release process #3265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion internals/cli/src/commands/release/releaseAlpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const releaseSiteAlpha = (updateVersion) => {
fs.writeFileSync(PKG_PATH, JSON.stringify(PKGContent, null, 2))
}

const needDistDirPackages = ['utils', 'vue-hooks', 'vue-runtime']
export const releaseAlpha = ({ updateVersion }) => {
const distLists = [
'dist3/',
Expand All @@ -90,7 +91,17 @@ export const releaseAlpha = ({ updateVersion }) => {
'vue-runtime'
]
distLists.forEach((item) => {
findAllpage(pathFromPackages(item), updateVersion)
if (needDistDirPackages.includes(item)) {
// 检查是否存在dist或dist3文件夹
const hasDistDir = fs.existsSync(pathFromPackages(`${item}/dist`))
const hasDist3Dir = fs.existsSync(pathFromPackages(`${item}/dist3`))

if (hasDistDir || hasDist3Dir) {
findAllpage(pathFromPackages(item), updateVersion)
}
} else {
findAllpage(pathFromPackages(item), updateVersion)
}
})
releaseSiteAlpha(updateVersion)
}
Loading