Skip to content

Commit

Permalink
fix: release script cross-spawn for Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimzinchuk committed Apr 30, 2024
1 parent e6bb921 commit 3d92f79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/release.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { release } from "@vc-shell/release-config";
import { spawnSync } from "node:child_process";
import { sync } from "cross-spawn";
import { updateBoilerplatePkgVersions } from "./utils";

release({
Expand All @@ -17,15 +17,15 @@ release({
toTag: (version) => `v${version}`,
bumpVersion: async (pkgName, pkgVersion) => {
const bumpArgs = ["workspace", pkgName, "version", pkgVersion, "--deferred"];
await spawnSync("yarn", bumpArgs);
await sync("yarn", bumpArgs);

const versionApplyArgs = ["version", "apply", "--all"];
await spawnSync("yarn", versionApplyArgs);
await sync("yarn", versionApplyArgs);
},
generateChangelog: async (pkgName, pkgVersion, workspaceName) => {
if (pkgName === "@vc-shell/create-vc-app") await updateBoilerplatePkgVersions();

const changelogArgs = ["conventional-changelog", "-p", "angular", "-i", "CHANGELOG.md", "-s", "--commit-path", "."];
await spawnSync("npx", changelogArgs, { cwd: workspaceName ? `${workspaceName}` : "." });
await sync("npx", changelogArgs, { cwd: workspaceName ? `${workspaceName}` : "." });
},
});

0 comments on commit 3d92f79

Please sign in to comment.