Skip to content

Commit

Permalink
fix chocolatey package
Browse files Browse the repository at this point in the history
  • Loading branch information
laedit committed May 5, 2024
1 parent eba552f commit 58c5561
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ jobs:
- name: Create chocolatey version
run: |
$winVersionChecksum = (Get-FileHash "artifacts/zips/NVika.win-x86.${{ steps.gitversion.outputs.nuGetVersionV2 }}.zip" -Algorithm SHA256).Hash
mkdir ./artifacts/chocolatey
$installPath = "chocolatey/tools/chocolateyInstall.ps1"
$originalContent = Get-Content $installPath
$originalContent.replace('[version]', "${{ steps.gitversion.outputs.nuGetVersionV2 }}") | Set-Content $installPath
$originalContent.replace('[version]', "${{ steps.gitversion.outputs.nuGetVersionV2 }}").replace('[checksum]', $winVersionChecksum) | Set-Content $installPath
choco pack chocolatey/nvika.nuspec --version ${{ steps.gitversion.outputs.nuGetVersionV2 }} --outdir artifacts/chocolatey
Set-Content $installPath $originalContent
Expand Down
3 changes: 2 additions & 1 deletion chocolatey/nvika.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<iconUrl>https://cdn.rawgit.com/laedit/vika/master/resources/icon.png</iconUrl>
<packageSourceUrl>https://github.com/laedit/vika/tree/master/chocolatey</packageSourceUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Parse analysis reports (InspectCode, ...) and send messages to build server or console.</description>
<description>Parse analysis reports (InspectCode, Gendarme, Roslyn Analyzers...) and send messages to build server or console.</description>
<summary>Parse analysis reports and send messages to build server or console.</summary>
<releaseNotes>https://github.com/laedit/vika/releases</releaseNotes>
<tags>report parsing build server inspectcode FxCop SARIF Roslyn Gendarme</tags>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion chocolatey/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$packageName = 'NVika'
$url = 'https://github.com/laedit/Vika/releases/download/v[version]/NVika.win-x86.[version].zip'

Install-ChocolateyZipPackage "$packageName" "$url" "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
Install-ChocolateyZipPackage -PackageName "$packageName" -Url "$url" -UnzipLocation "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" -Checksum '[checksum]' -ChecksumType 'sha256'

0 comments on commit 58c5561

Please sign in to comment.