diff --git a/dist/build-crates-debian-main.js b/dist/build-crates-debian-main.js index 82243db..ceeaf4c 100644 --- a/dist/build-crates-debian-main.js +++ b/dist/build-crates-debian-main.js @@ -128404,14 +128404,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { diff --git a/dist/build-crates-standalone-main.js b/dist/build-crates-standalone-main.js index 3da0614..d8ead99 100644 --- a/dist/build-crates-standalone-main.js +++ b/dist/build-crates-standalone-main.js @@ -128403,14 +128403,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await promises_.readFile((0,external_path_.join)(path, "Cross.toml"), "utf-8"); const crossManifest = parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - command_sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + command_sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); command_sh(command.join(" "), { cwd: path }); } function hostTarget() { @@ -128458,11 +128454,11 @@ function cloneFromGitHub(repo, options) { const remote = options.token == undefined ? `https://github.com/${repo}.git` : `https://${options.token}@github.com/${repo}.git`; const command = ["git", "clone", "--recursive", "--single-branch"]; if (options.branch != undefined) { - command.concat("--branch", options.branch); + command.push("--branch", options.branch); } - command.concat(remote); + command.push(remote); if (options.path != undefined) { - command.concat(options.path); + command.push(options.path); } command_sh(command.join(" ")); } diff --git a/dist/bump-crates-main.js b/dist/bump-crates-main.js index 4c5be19..9de7299 100644 --- a/dist/bump-crates-main.js +++ b/dist/bump-crates-main.js @@ -82262,14 +82262,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { diff --git a/dist/publish-crates-cargo-main.js b/dist/publish-crates-cargo-main.js index e1a899d..aeb0372 100644 --- a/dist/publish-crates-cargo-main.js +++ b/dist/publish-crates-cargo-main.js @@ -82262,14 +82262,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { diff --git a/dist/publish-crates-debian-main.js b/dist/publish-crates-debian-main.js index 8837e8b..4b1e137 100644 --- a/dist/publish-crates-debian-main.js +++ b/dist/publish-crates-debian-main.js @@ -128426,14 +128426,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { diff --git a/dist/publish-crates-eclipse-main.js b/dist/publish-crates-eclipse-main.js index 612f70a..ab9e32a 100644 --- a/dist/publish-crates-eclipse-main.js +++ b/dist/publish-crates-eclipse-main.js @@ -128423,14 +128423,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { @@ -128478,11 +128474,11 @@ function cloneFromGitHub(repo, options) { const remote = options.token == undefined ? `https://github.com/${repo}.git` : `https://${options.token}@github.com/${repo}.git`; const command = ["git", "clone", "--recursive", "--single-branch"]; if (options.branch != undefined) { - command.concat("--branch", options.branch); + command.push("--branch", options.branch); } - command.concat(remote); + command.push(remote); if (options.path != undefined) { - command.concat(options.path); + command.push(options.path); } sh(command.join(" ")); } diff --git a/dist/publish-crates-github-main.js b/dist/publish-crates-github-main.js index 1fe14b3..eb48ac4 100644 --- a/dist/publish-crates-github-main.js +++ b/dist/publish-crates-github-main.js @@ -128404,14 +128404,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { @@ -128535,11 +128531,11 @@ function cloneFromGitHub(repo, options) { const remote = options.token == undefined ? `https://github.com/${repo}.git` : `https://${options.token}@github.com/${repo}.git`; const command = ["git", "clone", "--recursive", "--single-branch"]; if (options.branch != undefined) { - command.concat("--branch", options.branch); + command.push("--branch", options.branch); } - command.concat(remote); + command.push(remote); if (options.path != undefined) { - command.concat(options.path); + command.push(options.path); } sh(command.join(" ")); } diff --git a/dist/publish-crates-homebrew-main.js b/dist/publish-crates-homebrew-main.js index 1972049..8af4993 100644 --- a/dist/publish-crates-homebrew-main.js +++ b/dist/publish-crates-homebrew-main.js @@ -128425,14 +128425,10 @@ async function installBinaryCached(name) { async function build(path, target) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents); - if (target == undefined) { - target ??= hostTarget(); - } - else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } function hostTarget() { @@ -128480,11 +128476,11 @@ function cloneFromGitHub(repo, options) { const remote = options.token == undefined ? `https://github.com/${repo}.git` : `https://${options.token}@github.com/${repo}.git`; const command = ["git", "clone", "--recursive", "--single-branch"]; if (options.branch != undefined) { - command.concat("--branch", options.branch); + command.push("--branch", options.branch); } - command.concat(remote); + command.push(remote); if (options.path != undefined) { - command.concat(options.path); + command.push(options.path); } sh(command.join(" ")); } diff --git a/src/cargo.ts b/src/cargo.ts index 1491d49..ee5bf2b 100644 --- a/src/cargo.ts +++ b/src/cargo.ts @@ -308,14 +308,12 @@ export async function build(path: string, target?: string) { const crossContents = await fs.readFile(join(path, "Cross.toml"), "utf-8"); const crossManifest = toml.parse(crossContents) as CrossManifest; - if (target == undefined) { - target ??= hostTarget(); - } else { - sh(`rustup target add ${target}`, { cwd: path }); - } + target ??= hostTarget(); + + sh(`rustup target add ${target}`, { cwd: path }); const command = target in crossManifest ? ["cross"] : ["cargo"]; - command.concat("cross", "build", "--release", "--bins", "--lib", "--target", target); + command.push("build", "--release", "--bins", "--lib", "--target", target); sh(command.join(" "), { cwd: path }); } diff --git a/src/git.ts b/src/git.ts index 500ec43..51966c3 100644 --- a/src/git.ts +++ b/src/git.ts @@ -12,11 +12,11 @@ export function cloneFromGitHub(repo: string, options: CloneFromGitHubOptions) { const command = ["git", "clone", "--recursive", "--single-branch"]; if (options.branch != undefined) { - command.concat("--branch", options.branch); + command.push("--branch", options.branch); } - command.concat(remote); + command.push(remote); if (options.path != undefined) { - command.concat(options.path); + command.push(options.path); } sh(command.join(" "));