-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from stackql/feature/stackql-release-update
updated to 0.5.509
- Loading branch information
Showing
4 changed files
with
38 additions
and
21 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
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 |
---|---|---|
@@ -1,25 +1,17 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
$ErrorActionPreference = 'Stop'; | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$url64 = 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.msi' | ||
|
||
# Download the file temporarily to calculate checksum | ||
$tempFile = Join-Path $env:TEMP 'stackql.msi' | ||
Invoke-WebRequest -Uri $url64 -OutFile $tempFile | ||
|
||
# Calculate checksum | ||
$checksum64 = (certutil -hashfile $tempFile SHA256)[1] -replace " ", "" | ||
Remove-Item $tempFile -Force | ||
|
||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'MSI' | ||
url64bit = $url64 | ||
softwareName = 'stackql*' | ||
checksum64 = $checksum64.Hash | ||
checksumType64= 'sha256' | ||
silentArgs = "/passive /l* stackql.log" | ||
validExitCodes= @(0, 3010, 1641) | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'MSI' | ||
url64bit = $url64 | ||
softwareName = 'stackql*' | ||
checksum64 = '60025e4479d5945c712230481004689fc38b68102423f3407330c90e28c07953' | ||
checksumType64 = 'sha256' | ||
silentArgs = "/passive /l* stackql.log" | ||
validExitCodes = @(0, 3010, 1641) | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs |
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,22 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
# Define URLs and paths | ||
$msiUrl = 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.msi' | ||
$msiTempPath = Join-Path $env:TEMP 'stackql_windows_amd64.msi' | ||
$installScriptPath = 'stackql\tools\chocolateyinstall.ps1' | ||
|
||
# Download the MSI file | ||
Invoke-WebRequest -Uri $msiUrl -OutFile $msiTempPath | ||
|
||
# Calculate the checksum | ||
$checksum = (certutil -hashfile $msiTempPath SHA256)[1] -replace " ", "" | ||
|
||
# Remove the temporary MSI file | ||
Remove-Item $msiTempPath -Force | ||
|
||
# Update the install script with the new checksum | ||
$scriptContent = Get-Content $installScriptPath -Raw | ||
$updatedScriptContent = $scriptContent -replace "(checksum64\s*=\s*)'.*'", "`$1'$checksum'" | ||
Set-Content $installScriptPath -Value $updatedScriptContent -Force | ||
|
||
Write-Host "Updated checksum in $installScriptPath" |