mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 20:26:49 +00:00
fix azcopy and rust
This commit is contained in:
54
images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1
Normal file
54
images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1
Normal file
@@ -0,0 +1,54 @@
|
||||
function Initialize-RustEnvironment {
|
||||
ln -sf "/usr/share/rust/.rustup" $HOME/.rustup
|
||||
ln -sf "/usr/share/rust/.cargo" $HOME/.cargo
|
||||
}
|
||||
function Get-RustVersion {
|
||||
Initialize-RustEnvironment
|
||||
$rustVersion = $(rustc --version) | Take-OutputPart -Part 1
|
||||
return "Rust $rustVersion"
|
||||
}
|
||||
|
||||
function Get-BindgenVersion {
|
||||
$bindgenVersion = $(bindgen --version) | Take-OutputPart -Part 1
|
||||
return "Bindgen $bindgenVersion"
|
||||
}
|
||||
|
||||
function Get-CargoVersion {
|
||||
$cargoVersion = $(cargo --version) | Take-OutputPart -Part 1
|
||||
return "Cargo $cargoVersion"
|
||||
}
|
||||
|
||||
function Get-CargoAuditVersion {
|
||||
$cargoAuditVersion = $(cargo audit --version) | Take-OutputPart -Part 1
|
||||
return "Cargo audit $cargoAuditVersion"
|
||||
}
|
||||
|
||||
function Get-CargoOutdatedVersion {
|
||||
$cargoOutdatedVersion = $(cargo outdated --version) | Take-OutputPart -Part 1 -Delimiter "v"
|
||||
return "Cargo outdated $cargoOutdatedVersion"
|
||||
}
|
||||
|
||||
function Get-CargoClippyVersion {
|
||||
$cargoClippyVersion = $(cargo-clippy --version) | Take-OutputPart -Part 1
|
||||
return "Cargo clippy $cargoClippyVersion"
|
||||
}
|
||||
|
||||
function Get-CbindgenVersion {
|
||||
$cbindgenVersion = $(cbindgen --version) | Take-OutputPart -Part 1
|
||||
return "Cbindgen $cbindgenVersion"
|
||||
}
|
||||
|
||||
function Get-RustupVersion {
|
||||
$rustupVersion = $(rustup --version) | Take-OutputPart -Part 1
|
||||
return "Rustup $rustupVersion"
|
||||
}
|
||||
|
||||
function Get-RustdocVersion {
|
||||
$rustdocVersion = $(rustdoc --version) | Take-OutputPart -Part 1
|
||||
return "Rustdoc $rustdocVersion"
|
||||
}
|
||||
|
||||
function Get-RustfmtVersion {
|
||||
$rustfmtVersion = $(rustfmt --version) | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-"
|
||||
return "Rustfmt $rustfmtVersion"
|
||||
}
|
||||
Reference in New Issue
Block a user