This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://stackoverflow.com/a/15121461 | |
Function Replace-InvalidFileNameChars { | |
param( | |
[Parameter(Mandatory=$true, | |
Position=0, | |
ValueFromPipeline=$true, | |
ValueFromPipelineByPropertyName=$true)] | |
[String]$Name | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
$token = Read-Host -Prompt 'Github PAT' | |
if(!$token) {$token = ""} | |
$org = Read-Host -Prompt 'Org or User' | |
if(!$org) {$org = ""} | |
$repo = Read-Host -Prompt 'Repo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version" | |
$buildCounter = "%build.counter%" | |
$buildNumber = "$version.$buildCounter" | |
Write-Host "##teamcity[buildNumber '$buildNumber']" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cmdletbinding()] | |
param( | |
[string]$Channel="LTS", | |
[string]$Version="Latest", | |
[string]$JSonFile, | |
[string]$InstallDir="<auto>", | |
[string]$Architecture="<auto>", | |
[ValidateSet("dotnet", "aspnetcore", "windowsdesktop", IgnoreCase = $false)] | |
[string]$Runtime, | |
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")] |
OlderNewer