Dmitry Nefedov 2 years ago
parent
commit
3f4d4db99d
  1. 17
      .github/workflows/Badge.yml
  2. 16
      Scripts/cloc.ps1

17
.github/workflows/Badge.yml

@ -17,25 +17,10 @@ jobs:
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@main uses: actions/checkout@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download cloc - name: Download cloc
run: | run: |
$Parameters = @{ . Scripts\cloc.ps1
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest"
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
- name: Get the Numbers - name: Get the Numbers
run: | run: |

16
Scripts/cloc.ps1

@ -0,0 +1,16 @@
# Download cloc
# https://github.com/AlDanial/cloc
$Parameters = @{
Uri = "https://api.github.com/repos/AlDanial/cloc/releases/latest"
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
Loading…
Cancel
Save