diff options
Diffstat (limited to 'tools/release/helpers/cargo.ts')
-rw-r--r-- | tools/release/helpers/cargo.ts | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/release/helpers/cargo.ts b/tools/release/helpers/cargo.ts index 619d7a0f7..2f750779c 100644 --- a/tools/release/helpers/cargo.ts +++ b/tools/release/helpers/cargo.ts @@ -33,10 +33,34 @@ export async function getMetadata(directory: string) { return JSON.parse(result!) as CargoMetadata; } -export async function publishCrate(directory: string) { +export function publishCrate(directory: string) { + return runCargoSubCommand({ + directory, + args: ["publish"], + }); +} + +export function build(directory: string) { + return runCargoSubCommand({ + directory, + args: ["build", "-vv"], + }); +} + +export function check(directory: string) { + return runCargoSubCommand({ + directory, + args: ["check"], + }); +} + +async function runCargoSubCommand(params: { + args: string[]; + directory: string; +}) { const p = Deno.run({ - cwd: directory, - cmd: ["cargo", "publish"], + cwd: params.directory, + cmd: ["cargo", ...params.args], stderr: "inherit", stdout: "inherit", }); |