mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[Ubuntu] Rework haskell.sh to install Cabal using GHCup (#2636)
* reworked haskell installation * added comment * resolved comments and added symlink * fixed haskell.sh * update haskell.sh * update installation * added error suppressing * reverted ghc intallation * added comments Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
@@ -219,6 +219,12 @@ function Get-GHCVersion {
|
||||
return "GHC $ghcVersion"
|
||||
}
|
||||
|
||||
function Get-GHCupVersion {
|
||||
$(ghcup --version) -match "version v(?<version>\d+(\.\d+){2,})" | Out-Null
|
||||
$ghcVersion = $Matches.version
|
||||
return "GHCup $ghcVersion"
|
||||
}
|
||||
|
||||
function Get-CabalVersion {
|
||||
$(cabal --version | Out-String) -match "cabal-install version (?<version>\d+\.\d+\.\d+\.\d+)" | Out-Null
|
||||
$cabalVersion = $Matches.version
|
||||
|
||||
@@ -181,6 +181,7 @@ $markdown += New-MDNewLine
|
||||
$markdown += New-MDHeader "Haskell" -Level 3
|
||||
$markdown += New-MDList -Style Unordered -Lines (@(
|
||||
(Get-GHCVersion),
|
||||
(Get-GHCupVersion),
|
||||
(Get-CabalVersion),
|
||||
(Get-StackVersion)
|
||||
) | Sort-Object
|
||||
|
||||
Reference in New Issue
Block a user