Skip to content

Commit

Permalink
feat: chocolatey package
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Jul 31, 2023
1 parent d8a8e26 commit 1561dcc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ Cargo.lock
*.pdb

.envrc

*.nupkg
18 changes: 18 additions & 0 deletions dist/choco/galoy-cli.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Read this before creating packages: https://docs.chocolatey.org/en-us/create/create-packages -->
<!-- It is especially important to read the above link to understand additional requirements when publishing packages to the community feed aka dot org (https://community.chocolatey.org/packages). -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>galoy-cli</id>
<version>0.1.2</version>
<title>Galoy CLI</title>
<authors>Galoy</authors>
<owners>Galoy</owners>
<licenseUrl>https://github.com/GaloyMoney/galoy-cli/blob/main/LICENSE</licenseUrl>
<projectUrl>https://github.com/GaloyMoney/galoy-cli</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A CLI Client for interacting with Galoy Backend.</description>
<copyright>Copyright 2023</copyright>
<tags>CLI galoy</tags>
</metadata>
</package>
19 changes: 19 additions & 0 deletions dist/choco/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$ErrorActionPreference = 'Stop'

$url = 'https://github.com/GaloyMoney/galoy-cli/releases/download/0.1.2/galoy-cli.exe'
$checksum = 'ebee9d50dd38da771295f66f14376ddc249955b8ae0d9beb0bdc66c8fda60d07'

$packageName = 'galoy-cli'
$installDir = "${env:ChocolateyInstall}\bin"

$packageArgs = @{
packageName = $packageName
fileFullPath = "$installDir\$packageName.exe"
url = $url
softwareName = 'galoy-cli*'
checksum = $checksum
checksumType = 'sha256'
}

Get-ChocolateyWebFile @packageArgs
Install-ChocolateyPath -PathToInstall $installDir -PathType 'Machine'
4 changes: 4 additions & 0 deletions dist/choco/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$packageName = 'galoy-cli'
$installDir = "${env:ChocolateyInstall}\bin"

Remove-Item "$installDir\$packageName.exe" -Force -ErrorAction SilentlyContinue

0 comments on commit 1561dcc

Please sign in to comment.