Cleanup old markdown documenation approach (#979)

This commit is contained in:
Aleksandr Chebotov
2020-06-02 20:07:12 +03:00
committed by GitHub
parent 8c8f384a61
commit 43e26fa96b
72 changed files with 133 additions and 1541 deletions

View File

@@ -25,8 +25,6 @@ function Get-GoVersion
{
$goFullVersion = $Matches.version
Write-Host "$goFullVersion has been found"
return $goFullVersion
}
else
{
@@ -46,38 +44,7 @@ else
exit 1
}
# Add details of available versions in Markdown
$tmplMark = @"
#### {0}
_Environment:_
* {1}: root directory of the Go {0} installation
"@
$tmplMarkRoot = @"
#### {0}
_Environment:_
* PATH: contains the location of go.exe version {0}
* GOROOT: root directory of the Go {0} installation
* {1}: root directory of the Go {0} installation
"@
$SoftwareName = "Go (x64)"
$Description = New-Object System.Text.StringBuilder
$goVersionsToInstall = $env:GO_VERSIONS.split(", ", [System.StringSplitOptions]::RemoveEmptyEntries)
foreach($go in $goVersionsToInstall) {
$goVersion = Get-GoVersion -goVersion $go
$goVersionTag = "GOROOT_{0}_{1}_X64" -f $go.split(".")
if ($goVersion -eq $go) {
if($go -eq $env:GO_DEFAULT) {
$null = $Description.AppendLine(($tmplMarkRoot -f $goVersion, $goVersionTag))
} else {
$null = $Description.AppendLine(($tmplMark -f $goVersion, $goVersionTag))
}
}
Get-GoVersion -goVersion $go
}
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()