Script to setup Windows 10 1903
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

20 lines
631 B

# Download cloc
# https://github.com/AlDanial/cloc
$Token = ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText
$Parameters = @{
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest"
Token = $Token
Authentication = "Bearer"
UseBasicParsing = $true
Verbose = $true
}
$Tag = (Invoke-RestMethod @Parameters).tag_name.replace("v", "")
$Parameters = @{
Uri = "https://github.com/AlDanial/cloc/releases/download/v$Tag/cloc-$Tag.exe"
OutFile = "$PSScriptRoot\cloc.exe"
UseBasicParsing = $true
Verbose = $true
}
Invoke-WebRequest @Parameters