-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7970585
commit 64ab5f2
Showing
7 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ Cargo.lock | |
*.pdb | ||
|
||
.envrc | ||
|
||
*.nupkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
export VERSION=$(cat version/version) | ||
export CHECKSUM=$(curl -L https://github.com/GaloyMoney/galoy-cli/releases/download/${VERSION}/sha256sums.txt | grep galoy-cli-x86_64-pc-windows-gnu | cut -d' ' -f1) | ||
|
||
pushd repo/dist/choco | ||
|
||
sed -i "7s/<version>.*<\/version>/<version>${VERSION}<\/version>/" galoy-cli.nuspec | ||
sed -i "3s/\$version=.*/\$version='${VERSION}'/" tools/chocolateyinstall.ps1 | ||
sed -i "4s/\$checksum=.*/\$checksum='${CHECKSUM}'/" tools/chocolateyinstall.ps1 | ||
|
||
choco apikey --key ${CHOCO_API_KEY} --source https://push.chocolatey.org/ | ||
choco push galoy-cli.${VERSION}.nupkg --source https://push.chocolatey.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?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.4</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> | ||
<iconUrl>https://galoy.io/wp-content/uploads/2021/07/Galoy-Current-Logo-Blue.svg</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A CLI Client for interacting with Galoy Backend.</description> | ||
<copyright>Copyright 2023</copyright> | ||
<tags>CLI galoy</tags> | ||
</metadata> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$version='0.1.4' | ||
$checksum = '73771aa07ff0170e4ca06e4df0d76605a8ea5517e3ac077526bc5df6e3ebb336' | ||
|
||
$url = "https://github.com/GaloyMoney/galoy-cli/releases/download/$version/galoy-cli-x86_64-pc-windows-gnu-$version.tar.gz" | ||
|
||
$packageName = 'galoy-cli' | ||
$installDir = "${env:ChocolateyInstall}\lib\$packageName" | ||
$binDir = "${env:ChocolateyInstall}\bin" | ||
|
||
$packageArgs = @{ | ||
packageName = $packageName | ||
fileFullPath = "$installDir\$packageName.tar.gz" | ||
url = $url | ||
checksum = $checksum | ||
checksumType = 'sha256' | ||
} | ||
|
||
Get-ChocolateyWebFile @packageArgs | ||
|
||
# Unpack the .tar.gz file | ||
Get-ChocolateyUnzip -FileFullPath "$installDir\$packageName.tar.gz" -Destination $installDir | ||
Get-ChocolateyUnzip -FileFullPath "$installDir\$packageName.tar" -Destination $installDir | ||
|
||
# Move the executable to the bin directory | ||
Move-Item -Path "$installDir\galoy-cli-x86_64-pc-windows-gnu-$version\$packageName.exe" -Destination "$binDir\$packageName.exe" | ||
|
||
Install-ChocolateyPath -PathToInstall $binDir -PathType 'Machine' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |