Dmitry Nefedov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
Scripts/cloc.ps1
|
@ -1,12 +1,16 @@ |
|
|
# Download cloc |
|
|
# Download cloc |
|
|
# https://github.com/AlDanial/cloc |
|
|
# https://github.com/AlDanial/cloc |
|
|
|
|
|
|
|
|
|
|
|
$Token = ConvertTo-SecureString '${{ secrets.GITHUB_TOKEN }}' -AsPlainText |
|
|
$Parameters = @{ |
|
|
$Parameters = @{ |
|
|
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest" |
|
|
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest" |
|
|
|
|
|
Token = $Token |
|
|
|
|
|
Authentication = "Bearer" |
|
|
UseBasicParsing = $true |
|
|
UseBasicParsing = $true |
|
|
Verbose = $true |
|
|
Verbose = $true |
|
|
} |
|
|
} |
|
|
$Tag = (Invoke-RestMethod @Parameters).tag_name.replace("v", "") |
|
|
$Tag = (Invoke-RestMethod @Parameters).tag_name.replace("v", "") |
|
|
|
|
|
|
|
|
$Parameters = @{ |
|
|
$Parameters = @{ |
|
|
Uri = "https://github.com/AlDanial/cloc/releases/download/v$Tag/cloc-$Tag.exe" |
|
|
Uri = "https://github.com/AlDanial/cloc/releases/download/v$Tag/cloc-$Tag.exe" |
|
|
OutFile = "$PSScriptRoot\cloc.exe" |
|
|
OutFile = "$PSScriptRoot\cloc.exe" |
|
|