mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 20:56:47 +00:00
[Ubuntu] Add Fastlane (#2751)
This commit is contained in:
@@ -102,7 +102,7 @@ function Get-GemVersion {
|
|||||||
$result = Get-CommandResult "gem --version"
|
$result = Get-CommandResult "gem --version"
|
||||||
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
|
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||||
$gemVersion = $Matches.version
|
$gemVersion = $Matches.version
|
||||||
return "Gem $gemVersion"
|
return "RubyGems $gemVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-MinicondaVersion {
|
function Get-MinicondaVersion {
|
||||||
|
|||||||
@@ -144,6 +144,10 @@ if (-not (Test-IsUbuntu16)) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Test-IsUbuntu20) {
|
||||||
|
$toolsList += (Get-FastlaneVersion)
|
||||||
|
}
|
||||||
|
|
||||||
$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object)
|
$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object)
|
||||||
|
|
||||||
$markdown += New-MDHeader "CLI Tools" -Level 3
|
$markdown += New-MDHeader "CLI Tools" -Level 3
|
||||||
|
|||||||
@@ -264,6 +264,11 @@ function Get-AWSSAMVersion {
|
|||||||
return "AWS SAM CLI $(sam --version | Take-OutputPart -Part -1)"
|
return "AWS SAM CLI $(sam --version | Take-OutputPart -Part -1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-FastlaneVersion {
|
||||||
|
$fastlaneVersion = fastlane --version | Select-String "^fastlane [0-9]" | Take-OutputPart -Part 1
|
||||||
|
return "Fastlane $fastlaneVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-HubCliVersion {
|
function Get-HubCliVersion {
|
||||||
$hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2
|
$hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2
|
||||||
return "Hub CLI $hubVersion"
|
return "Hub CLI $hubVersion"
|
||||||
|
|||||||
@@ -1,13 +1,22 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
################################################################################
|
################################################################################
|
||||||
## File: ruby.sh
|
## File: ruby.sh
|
||||||
## Desc: Installs Ruby requirements
|
## Desc: Installs Ruby requirements and ruby gems
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
source $HELPER_SCRIPTS/install.sh
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
sudo apt-get install ruby-full
|
apt-get install ruby-full
|
||||||
sudo gem update --system
|
gem update
|
||||||
|
|
||||||
|
# Install ruby gems from toolset
|
||||||
|
gemsToInstall=$(get_toolset_value ".rubygems[] .name")
|
||||||
|
if [ -n "$gemsToInstall" ]; then
|
||||||
|
for gem in $gemsToInstall; do
|
||||||
|
echo "Installing gem $gem"
|
||||||
|
gem install $gem
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Ruby requirements
|
# Install Ruby requirements
|
||||||
apt-get install -y libz-dev openssl libssl-dev
|
apt-get install -y libz-dev openssl libssl-dev
|
||||||
@@ -44,3 +53,5 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do
|
|||||||
touch $COMPLETE_FILE_PATH
|
touch $COMPLETE_FILE_PATH
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
invoke_tests "Tools" "Ruby"
|
||||||
@@ -344,3 +344,26 @@ Describe "Python" {
|
|||||||
"$PythonCommand --version" | Should -ReturnZeroExitCode
|
"$PythonCommand --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "Ruby" {
|
||||||
|
$testCases = @("ruby", "gem") | ForEach-Object { @{RubyCommand = $_} }
|
||||||
|
|
||||||
|
It "<RubyCommand>" -TestCases $testCases {
|
||||||
|
param (
|
||||||
|
[string] $RubyCommand
|
||||||
|
)
|
||||||
|
|
||||||
|
"$RubyCommand --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
$gemTestCases = (Get-ToolsetContent).rubygems | ForEach-Object {
|
||||||
|
@{gemName = $_.name}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($gemTestCases)
|
||||||
|
{
|
||||||
|
It "Gem <gemName> is installed" -TestCases $gemTestCases {
|
||||||
|
"gem list -i '^$gemName$'" | Should -MatchCommandOutput "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -278,5 +278,6 @@
|
|||||||
"7.4",
|
"7.4",
|
||||||
"8.0"
|
"8.0"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"rubygems": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,5 +281,6 @@
|
|||||||
"7.4",
|
"7.4",
|
||||||
"8.0"
|
"8.0"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"rubygems": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,5 +255,8 @@
|
|||||||
"7.4",
|
"7.4",
|
||||||
"8.0"
|
"8.0"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"rubygems": [
|
||||||
|
{"name": "fastlane"}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user