Add missed Rust tools to the documentation for macOS (#2397)

* Add documentation for rust tools

* Rename helpers
This commit is contained in:
Sergey Dolin
2021-01-11 12:57:51 +05:00
committed by GitHub
parent 31c97aac43
commit 83ccdbcc9d
2 changed files with 28 additions and 3 deletions

View File

@@ -24,11 +24,32 @@ function Get-RVersion {
$rVersion = Run-Command "R --version | grep 'R version'" | Take-Part -Part 2
return "R $rVersion"
}
function Get-RustVersion {
$rustVersion = Run-Command "rustc --version" | Take-Part -Part 1
return "Rust $rustVersion"
}
function Get-RustfmtVersion {
$version = Run-Command "rustfmt --version" | Take-Part -Part 1
return "Rustfmt $version"
}
function Get-RustdocVersion {
$version = Run-Command "rustdoc --version" | Take-Part -Part 1
return "Rustdoc $version"
}
function Get-RustCargoVersion {
$version = Run-Command "cargo --version" | Take-Part -Part 1
return "Cargo $version"
}
function Get-RustClippyVersion {
$version = Run-Command "cargo clippy --version" | Take-Part -Part 1
return "Clippy $version"
}
function Get-Bindgen {
$bindgenVersion = Run-Command "bindgen --version" | Take-Part -Part 1
return "Bindgen $bindgenVersion"
@@ -446,4 +467,4 @@ function Get-SwiftLintVersion {
function Get-PowershellVersion {
$powershellVersion = Run-Command "powershell --version"
return $powershellVersion
}
}

View File

@@ -175,14 +175,18 @@ if ( -not $os.IsHighSierra) {
$markdown += New-MDHeader "Rust Tools" -Level 3
$markdown += New-MDList -Style Unordered -Lines @(
(Get-RustVersion),
(Get-RustupVersion)
(Get-RustupVersion),
(Get-RustdocVersion),
(Get-RustCargoVersion)
)
$markdown += New-MDHeader "Packages" -Level 4
$markdown += New-MDList -Style Unordered -Lines @(
(Get-Bindgen),
(Get-Cbindgen),
(Get-Cargooutdated),
(Get-Cargoaudit)
(Get-Cargoaudit),
(Get-RustfmtVersion),
(Get-RustClippyVersion)
)
}