Files
aria2-rust-pro/scripts/release/smoke-version.ps1
T

34 lines
677 B
PowerShell

param(
[switch]$Build,
[string]$TargetTriple,
[string]$BinaryPath
)
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
$xtaskManifest = Join-Path $repoRoot "xtask\Cargo.toml"
$arguments = @(
"cargo",
"run",
"--manifest-path",
$xtaskManifest,
"--",
"release",
"smoke-version"
)
if ($Build) {
$arguments += "--build"
}
if (-not [string]::IsNullOrWhiteSpace($TargetTriple)) {
$arguments += @("--target-triple", $TargetTriple)
}
if (-not [string]::IsNullOrWhiteSpace($BinaryPath)) {
$arguments += @("--binary-path", $BinaryPath)
}
rtk @arguments