[Ubuntu] Add Fastlane (#2751)

This commit is contained in:
Mikhail Timofeev
2021-02-19 18:33:28 +03:00
committed by GitHub
parent d76f3274f8
commit c4d66c8dc7
8 changed files with 56 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ function Get-GemVersion {
$result = Get-CommandResult "gem --version"
$result.Output -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$gemVersion = $Matches.version
return "Gem $gemVersion"
return "RubyGems $gemVersion"
}
function Get-MinicondaVersion {

View File

@@ -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-MDHeader "CLI Tools" -Level 3

View File

@@ -264,6 +264,11 @@ function Get-AWSSAMVersion {
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 {
$hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2
return "Hub CLI $hubVersion"

View File

@@ -1,13 +1,22 @@
#!/bin/bash -e
################################################################################
## File: ruby.sh
## Desc: Installs Ruby requirements
## Desc: Installs Ruby requirements and ruby gems
################################################################################
source $HELPER_SCRIPTS/install.sh
sudo apt-get install ruby-full
sudo gem update --system
apt-get install ruby-full
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
apt-get install -y libz-dev openssl libssl-dev
@@ -44,3 +53,5 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do
touch $COMPLETE_FILE_PATH
fi
done
invoke_tests "Tools" "Ruby"

View File

@@ -344,3 +344,26 @@ Describe "Python" {
"$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"
}
}
}

View File

@@ -278,5 +278,6 @@
"7.4",
"8.0"
]
}
},
"rubygems": []
}

View File

@@ -281,5 +281,6 @@
"7.4",
"8.0"
]
}
},
"rubygems": []
}

View File

@@ -255,5 +255,8 @@
"7.4",
"8.0"
]
}
},
"rubygems": [
{"name": "fastlane"}
]
}