mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 04:37:09 +00:00
fix azcopy and rust
This commit is contained in:
@@ -217,56 +217,6 @@ function Get-StackVersion {
|
||||
return "Stack $stackVersion"
|
||||
}
|
||||
|
||||
function Get-RustVersion {
|
||||
$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"
|
||||
}
|
||||
|
||||
function Get-AzModuleVersions {
|
||||
$azModuleVersions = Get-ChildItem /usr/share | Where-Object { $_ -match "az_\d+" } | Foreach-Object {
|
||||
$_.Name.Split("_")[1]
|
||||
|
||||
@@ -4,14 +4,15 @@ param (
|
||||
)
|
||||
|
||||
Import-Module MarkdownPS
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Databases.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Rust.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableNameChecking
|
||||
|
||||
$markdown = ""
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ function Test-IsUbuntu20 {
|
||||
return (lsb_release -rs) -eq "20.04"
|
||||
}
|
||||
|
||||
function Get-ToolsetContent
|
||||
{
|
||||
function Get-ToolsetContent {
|
||||
$toolset = Join-Path $env:INSTALLER_SCRIPT_FOLDER "toolset.json"
|
||||
Get-Content $toolset -Raw | ConvertFrom-Json
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
@@ -4,7 +4,7 @@ function Get-7zipVersion {
|
||||
}
|
||||
|
||||
function Get-AnsibleVersion {
|
||||
$ansibleVersion = ansible --version | Select-Object -First 1 | Take-OutputPart -Part 1
|
||||
$ansibleVersion = sudo ansible --version | Select-Object -First 1 | Take-OutputPart -Part 1
|
||||
return "Ansible $ansibleVersion"
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@ function Get-AzCopy10Version {
|
||||
}
|
||||
|
||||
function Get-BazelVersion {
|
||||
$bazelVersion = bazel --version | Select-String "bazel" | Take-OutputPart -Part 1
|
||||
$bazelVersion = sudo bazel --version | Select-String "bazel" | Take-OutputPart -Part 1
|
||||
return "Bazel $bazelVersion"
|
||||
}
|
||||
|
||||
function Get-BazeliskVersion {
|
||||
$bazeliskVersion = bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v"
|
||||
$bazeliskVersion = sudo bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v"
|
||||
return "Bazelisk $bazeliskVersion"
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ function Get-GitFTPVersion {
|
||||
}
|
||||
|
||||
function Get-GoogleCloudSDKVersion {
|
||||
return "$(gcloud --version | Select-Object -First 1)"
|
||||
return "$(sudo gcloud --version | Select-Object -First 1)"
|
||||
}
|
||||
|
||||
function Get-HavegedVersion {
|
||||
@@ -93,7 +93,7 @@ function Get-HavegedVersion {
|
||||
}
|
||||
|
||||
function Get-HerokuVersion {
|
||||
$herokuVersion = heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
||||
$herokuVersion = sudo heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
||||
return "Heroku $herokuVersion"
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ function Get-NewmanVersion {
|
||||
}
|
||||
|
||||
function Get-NvmVersion {
|
||||
$nvmVersion = bash -c "source $HOME/.nvm/nvm.sh && nvm --version"
|
||||
$nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version"
|
||||
return "nvm $nvmVersion"
|
||||
}
|
||||
|
||||
@@ -193,12 +193,12 @@ function Get-JqVersion {
|
||||
}
|
||||
|
||||
function Get-AzureCliVersion {
|
||||
$azcliVersion = az -v | Select-String "azure-cli" | Take-OutputPart -Part -1
|
||||
$azcliVersion = sudo az -v | Select-String "azure-cli" | Take-OutputPart -Part -1
|
||||
return "Azure CLI (azure-cli) $azcliVersion"
|
||||
}
|
||||
|
||||
function Get-AzureDevopsVersion {
|
||||
$azdevopsVersion = az -v | Select-String "azure-devops" | Take-OutputPart -Part -1
|
||||
$azdevopsVersion = sudo az -v | Select-String "azure-devops" | Take-OutputPart -Part -1
|
||||
return "Azure CLI (azure-devops) $azdevopsVersion"
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ function Get-GitHubCliVersion {
|
||||
}
|
||||
|
||||
function Get-NetlifyCliVersion {
|
||||
$netlifyVersion = netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
||||
$netlifyVersion = sudo netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
||||
return "Netlify CLI $netlifyVersion"
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ rm azcopy.tar.gz
|
||||
wget -O /tmp/azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
|
||||
tar zxvf /tmp/azcopy.tar.gz --strip-components=1 -C /tmp
|
||||
mv /tmp/azcopy /usr/local/bin/azcopy10
|
||||
chmod +x /usr/local/bin/azcopy10
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
|
||||
Reference in New Issue
Block a user