Skip to content

Commit 9bd2b29

Browse files
committed
fix: release
1 parent 96e5f6a commit 9bd2b29

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

scripts/release.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ const ROOT = join(import.meta.dirname, "..");
1010
// ── Helpers ──
1111

1212
function run(cmd: string, opts?: { cwd?: string; stdio?: "pipe" | "inherit" }) {
13-
return execSync(cmd, {
13+
const result = execSync(cmd, {
1414
cwd: opts?.cwd ?? ROOT,
1515
stdio: opts?.stdio ?? "pipe",
1616
encoding: "utf-8",
17-
}).trim();
17+
});
18+
// execSync returns null when stdio is "inherit"
19+
return result?.trim() ?? "";
1820
}
1921

2022
function fatal(msg: string): never {
@@ -156,7 +158,10 @@ async function main() {
156158

157159
// Commit & push
158160
console.log("\n\x1b[1mCommitting version bump...\x1b[0m");
159-
run("git add -A");
161+
run("git add package.json");
162+
for (const pkg of packages) {
163+
run(`git add ${join(pkg, "package.json")}`);
164+
}
160165
run(`git commit -m "release: v${version}"`);
161166
run("git push origin main");
162167

0 commit comments

Comments
 (0)