Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion actions/monorepo-preview-release/dist/index.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions actions/monorepo-preview-release/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ const PublishMode = {
type PublishMode = (typeof PublishMode)[keyof typeof PublishMode];

async function bumpPackage(pkg: WorkspacePackage, preid: string): Promise<string> {
const result = await runLogged("pnpm", ["version", "prerelease", "--preid", preid, "--no-git-tag-version"], {
cwd: pkg.path,
group: `pnpm version: ${pkg.name}`,
});
// --no-git-checks: earlier bumps in the same run dirty the working tree,
// and pnpm version refuses to run on an unclean tree by default
const result = await runLogged(
"pnpm",
["version", "prerelease", "--preid", preid, "--no-git-tag-version", "--no-git-checks"],
{
cwd: pkg.path,
group: `pnpm version: ${pkg.name}`,
},
);
if (result.exitCode !== 0) {
throw new Error(`pnpm version failed for ${pkg.name} (exit ${result.exitCode}): ${result.output}`);
}
Expand Down
2 changes: 1 addition & 1 deletion actions/preview-release/dist/index.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions actions/preview-release/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ const PublishMode = {
type PublishMode = (typeof PublishMode)[keyof typeof PublishMode];

async function bumpPackage(pkg: Package, preid: string): Promise<string> {
const result = await runLogged("pnpm", ["version", "prerelease", "--preid", preid, "--no-git-tag-version"], {
cwd: pkg.path,
group: `pnpm version: ${pkg.name}`,
});
// --no-git-checks: pnpm version refuses to run on an unclean working tree
// by default, and CI steps before this one may leave the tree dirty
const result = await runLogged(
"pnpm",
["version", "prerelease", "--preid", preid, "--no-git-tag-version", "--no-git-checks"],
{
cwd: pkg.path,
group: `pnpm version: ${pkg.name}`,
},
);
if (result.exitCode !== 0) {
throw new Error(`pnpm version failed for ${pkg.name} (exit ${result.exitCode}): ${result.output}`);
}
Expand Down