Skip to content

Commit 86c1355

Browse files
authored
Merge pull request #216 from vue-pivottable/fix/clean-before-build
fix: 베타 버전이 있는 패키지만 빌드/배포하도록 개선
2 parents a009c80 + dfb072a commit 86c1355

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-pivottable/lazy-table-renderer": patch
3+
---
4+
5+
test: 릴리스 워크플로우 개선 테스트

packages/lazy-table-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"license": "MIT",
4444
"scripts": {
4545
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --scope lazy-table-renderer",
46-
"clean": "rimraf lib",
46+
"clean": "rimraf dist",
4747
"build": "vite build",
4848
"lint": "eslint ."
4949
},

packages/plotly-renderer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"author": "Sumin, Lee <[email protected]>",
3838
"license": "MIT",
3939
"scripts": {
40+
"clean": "rimraf dist",
4041
"build": "vite build"
4142
},
4243
"dependencies": {

scripts/release-packages.cjs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ const packages = [
2525
{
2626
name: 'vue3-pivottable',
2727
path: '.',
28-
buildCmd: 'pnpm build',
28+
buildCmd: 'pnpm clean && pnpm build',
2929
publishCmd: 'pnpm changeset publish'
3030
},
3131
{
3232
name: '@vue-pivottable/plotly-renderer',
3333
path: './packages/plotly-renderer',
34-
buildCmd: 'pnpm --filter @vue-pivottable/plotly-renderer build',
34+
buildCmd: 'pnpm --filter @vue-pivottable/plotly-renderer clean && pnpm --filter @vue-pivottable/plotly-renderer build',
3535
publishCmd: 'pnpm changeset publish --filter @vue-pivottable/plotly-renderer',
3636
tokenEnv: 'NPM_TOKEN_SUMIN'
3737
},
3838
{
3939
name: '@vue-pivottable/lazy-table-renderer',
4040
path: './packages/lazy-table-renderer',
41-
buildCmd: 'pnpm --filter @vue-pivottable/lazy-table-renderer build',
41+
buildCmd: 'pnpm --filter @vue-pivottable/lazy-table-renderer clean && pnpm --filter @vue-pivottable/lazy-table-renderer build',
4242
publishCmd: 'pnpm changeset publish --filter @vue-pivottable/lazy-table-renderer',
4343
tokenEnv: 'NPM_TOKEN_SUMIN'
4444
}
@@ -62,6 +62,17 @@ async function releasePackages() {
6262
throw new Error(`Package directory not found: ${pkg.path}`);
6363
}
6464

65+
// Get package version
66+
const packageJsonPath = `${pkg.path}/package.json`;
67+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
68+
const currentVersion = packageJson.version;
69+
70+
// Skip if not a beta version (no changeset)
71+
if (!currentVersion.includes('-beta')) {
72+
log.info(`Skipping ${pkg.name} - no beta version (${currentVersion})`);
73+
continue;
74+
}
75+
6576
// Build package
6677
log.info(`Building ${pkg.name}...`);
6778
execSync(pkg.buildCmd, {

0 commit comments

Comments
 (0)