Group and clear workspace status in the sidebar (#1317)
* Add status grouping to the workspace sidebar * Mark workspaces as read from the sidebar * Clean package builds before release checks * Fix sidebar status follow-up checks
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { rmSync } from "node:fs";
|
||||
import { basename, dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const packageRoot = resolve(process.cwd());
|
||||
const distPath = resolve(packageRoot, "dist");
|
||||
|
||||
if (packageRoot === repoRoot) {
|
||||
throw new Error("Refusing to clean dist from the repository root");
|
||||
}
|
||||
|
||||
if (dirname(distPath) !== packageRoot || basename(distPath) !== "dist") {
|
||||
throw new Error(`Refusing to clean unexpected path: ${distPath}`);
|
||||
}
|
||||
|
||||
rmSync(distPath, { recursive: true, force: true });
|
||||
Reference in New Issue
Block a user