mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Merge pull request #296 from vmapetr/v-dmshib/update-gem-latest
Update gem to latest version
This commit is contained in:
@@ -7,5 +7,11 @@
|
|||||||
# Source the helpers for use with the script
|
# Source the helpers for use with the script
|
||||||
source $HELPER_SCRIPTS/document.sh
|
source $HELPER_SCRIPTS/document.sh
|
||||||
|
|
||||||
|
sudo apt-get install ruby-full
|
||||||
|
sudo gem update --system
|
||||||
|
|
||||||
# Install Ruby requirements
|
# Install Ruby requirements
|
||||||
apt-get install -y libz-dev openssl libssl-dev
|
apt-get install -y libz-dev openssl libssl-dev
|
||||||
|
|
||||||
|
DocumentInstalledItem "ruby ($(ruby --version 2>&1 | cut -d ' ' -f 2))"
|
||||||
|
DocumentInstalledItem "gem ($(gem -v 2>&1 | tail -n 1))"
|
||||||
@@ -17,4 +17,8 @@ $latestRubyBinPath2_5 = Get-ChildItem -Path $toolcacheRubyPath | Sort-Object {[S
|
|||||||
|
|
||||||
Add-MachinePathItem $latestRubyBinPath2_5
|
Add-MachinePathItem $latestRubyBinPath2_5
|
||||||
$env:Path = Get-MachinePath
|
$env:Path = Get-MachinePath
|
||||||
|
|
||||||
|
# Update ruby gem to latest version
|
||||||
|
gem update --system
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ else
|
|||||||
$rubyExeOnPath = (Get-Command -Name 'ruby').Path
|
$rubyExeOnPath = (Get-Command -Name 'ruby').Path
|
||||||
$rubyBinOnPath = Split-Path -Path $rubyExeOnPath
|
$rubyBinOnPath = Split-Path -Path $rubyExeOnPath
|
||||||
$rubyVersionOnPath = Get-RubyVersion -rubyRootPath $rubyBinOnPath
|
$rubyVersionOnPath = Get-RubyVersion -rubyRootPath $rubyBinOnPath
|
||||||
|
$gemVersion = & gem -v
|
||||||
|
|
||||||
# Add details of available versions in Markdown
|
# Add details of available versions in Markdown
|
||||||
$SoftwareName = "Ruby (x64)"
|
$SoftwareName = "Ruby (x64)"
|
||||||
@@ -48,6 +49,7 @@ $Description = @"
|
|||||||
_Environment:_
|
_Environment:_
|
||||||
* Location: $rubyBinOnPath
|
* Location: $rubyBinOnPath
|
||||||
* PATH: contains the location of ruby.exe version $rubyVersionOnPath
|
* PATH: contains the location of ruby.exe version $rubyVersionOnPath
|
||||||
|
* Gem Version: $gemVersion
|
||||||
"@
|
"@
|
||||||
|
|
||||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||||
|
|||||||
Reference in New Issue
Block a user