Skip to content

Commit e22cd0e

Browse files
committed
fix: edge releasing
1 parent 9f8a318 commit e22cd0e

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

scripts/bump.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,20 @@ async function loadWorkspaceData(path: string): Promise<string[]> {
6262
return Array.isArray(data) ? data : []
6363
}
6464

65-
async function loadWorkspace(dir: string, workspaces: string[] = []) {
65+
async function loadWorkspace(dir: string, workspaces?: string[]) {
6666
const workspacePkg = await loadPackage(dir)
67-
const workspacesYaml = await loadWorkspaceData(
68-
resolve(__dirname, './pnpm-workspace.yaml')
69-
)
70-
workspacePkg.data.workspaces = [...workspaces, ...workspacesYaml]
71-
72-
const pkgDirs = await globby(
73-
[...(workspacePkg.data.workspaces || []), ...workspaces],
74-
{
75-
onlyDirectories: true
76-
}
77-
)
67+
if (workspaces) {
68+
workspacePkg.data.workspaces = [...workspaces]
69+
} else {
70+
const workspacesYaml = await loadWorkspaceData(
71+
resolve(__dirname, './pnpm-workspace.yaml')
72+
)
73+
workspacePkg.data.workspaces = [...workspacesYaml]
74+
}
75+
76+
const pkgDirs = await globby(workspacePkg.data.workspaces, {
77+
onlyDirectories: true
78+
})
7879

7980
const packages: Package[] = []
8081

@@ -132,7 +133,7 @@ async function loadWorkspace(dir: string, workspaces: string[] = []) {
132133
}
133134

134135
async function main() {
135-
const workspace = await loadWorkspace(process.cwd())
136+
const workspace = await loadWorkspace(process.cwd(), ['packages/*'])
136137

137138
const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim()
138139
const release = `${workspace.workspacePkg.data.version}-${commit}`

scripts/release-edge.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ fi
2020
for PKG in packages/* ; do
2121
pushd $PKG
2222
echo "⚡ Publishing $PKG with edge tag"
23-
pnpm publish --access public --no-git-checks --tag edge
23+
# pnpm publish --access public --no-git-checks --tag edge
2424
popd
2525
done

0 commit comments

Comments
 (0)