diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 84b893268..d92bdbc6e 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -42,6 +42,31 @@ function Get-RustVersion { return $rustVersion } +function Get-RustupVersion { + $version = [regex]::matches($(rustup --version), "\d+\.\d+\.\d+").Value + return $version +} + +function Get-RustCargoVersion { + $version = [regex]::matches($(cargo --version), "\d+\.\d+\.\d+").Value + return $version +} + +function Get-RustdocVersion { + $version = [regex]::matches($(rustdoc --version), "\d+\.\d+\.\d+").Value + return $version +} + +function Get-RustfmtVersion { + $version = [regex]::matches($(rustfmt --version), "\d+\.\d+\.\d+").Value + return $version +} + +function Get-RustClippyVersion { + $version = [regex]::matches($(cargo clippy --version), "\d+\.\d+\.\d+").Value + return $version +} + function Get-BindgenVersion { return bindgen --version } diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2d20da763..605b57c21 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -116,14 +116,19 @@ $markdown += New-MDList -Style Unordered -Lines @( $markdown += New-MDHeader "Rust Tools" -Level 3 $markdown += New-MDList -Style Unordered -Lines @( - "Rust $(Get-RustVersion)" + "Rust $(Get-RustVersion)", + "Rustup $(Get-RustupVersion)", + "Cargo $(Get-RustCargoVersion)", + "Rustdoc $(Get-RustdocVersion)" ) $markdown += New-MDHeader "Packages" -Level 4 $markdown += New-MDList -Style Unordered -Lines @( (Get-BindgenVersion), (Get-CbindgenVersion), (Get-CargoAuditVersion), - (Get-CargoOutdatedVersion) + (Get-CargoOutdatedVersion), + "Rustfmt $(Get-RustfmtVersion)", + "Clippy $(Get-RustClippyVersion)" ) $markdown += New-MDHeader "Browsers and webdrivers" -Level 3