summaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-02-02 19:34:43 -0800
committerGitHub <noreply@github.com>2022-02-02 22:34:43 -0500
commit5df7839d181f88c2c4d92331d0608a6e8bb51761 (patch)
tree333a8beb77852ac419d8535fa2a6a066d497317d /deployment
parent8587af6936cf241e5272ef25470e794854b5125c (diff)
ci: disable 32-bit in choco generation (#671)
Seems like the 32-bit binary triggers false positives on VirusTotal. Going to disable this for now.
Diffstat (limited to 'deployment')
-rw-r--r--deployment/windows/choco/choco_packager.py26
-rw-r--r--deployment/windows/choco/chocolateyinstall.ps1.template10
2 files changed, 13 insertions, 23 deletions
diff --git a/deployment/windows/choco/choco_packager.py b/deployment/windows/choco/choco_packager.py
index da8e2960..daf3f15f 100644
--- a/deployment/windows/choco/choco_packager.py
+++ b/deployment/windows/choco/choco_packager.py
@@ -7,17 +7,15 @@ from string import Template
import os
args = sys.argv
-deployment_file_path_32 = args[1]
-deployment_file_path_64 = args[2]
-version = args[3]
-nuspec_template = args[4]
-ps1_template = args[5]
-generated_nuspec = args[6]
-generated_ps1 = args[7]
-generated_ps1_dir = args[8]
+deployment_file_path_64 = args[1]
+version = args[2]
+nuspec_template = args[3]
+ps1_template = args[4]
+generated_nuspec = args[5]
+generated_ps1 = args[6]
+generated_ps1_dir = args[7]
print("Generating Chocolatey package for:")
-print(" 32-bit: %s" % deployment_file_path_32)
print(" 64-bit: %s" % deployment_file_path_64)
print(" VERSION: %s" % version)
print(" NUSPEC TEMPLATE: %s" % nuspec_template)
@@ -26,14 +24,10 @@ print(" GENERATED NUSPEC: %s" % generated_nuspec)
print(" GENERATED PS1: %s" % generated_ps1)
print(" GENERATED PS1 DIR: %s" % generated_ps1_dir)
-with open(deployment_file_path_32, "rb") as deployment_file_32, open(
- deployment_file_path_64, "rb"
-) as deployment_file_64:
- hash_32 = hashlib.sha1(deployment_file_32.read()).hexdigest()
+with open(deployment_file_path_64, "rb") as deployment_file_64:
hash_64 = hashlib.sha1(deployment_file_64.read()).hexdigest()
- print("Generated 32 hash: %s" % str(hash_32))
- print("Generated 64 hash: %s" % str(hash_64))
+ print("Generated hash for 64-bit program: %s" % str(hash_64))
with open(nuspec_template, "r") as template_file:
template = Template(template_file.read())
@@ -48,7 +42,7 @@ with open(deployment_file_path_32, "rb") as deployment_file_32, open(
os.makedirs(generated_ps1_dir)
with open(ps1_template, "r") as template_file:
template = Template(template_file.read())
- substitute = template.safe_substitute(version=version, hash_32=hash_32, hash_64=hash_64)
+ substitute = template.safe_substitute(version=version, hash_64=hash_64)
print("\n================== Generated chocolatey-install file ==================\n")
print(substitute)
print("\n============================================================\n")
diff --git a/deployment/windows/choco/chocolateyinstall.ps1.template b/deployment/windows/choco/chocolateyinstall.ps1.template
index 638d7281..a9245d18 100644
--- a/deployment/windows/choco/chocolateyinstall.ps1.template
+++ b/deployment/windows/choco/chocolateyinstall.ps1.template
@@ -1,7 +1,6 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
-$url = 'https://github.com/ClementTsang/bottom/releases/download/$version/bottom_i686-pc-windows-msvc.zip'
-$url64 = 'https://github.com/ClementTsang/bottom/releases/download/$version/bottom_x86_64-pc-windows-msvc.zip'
+$url = 'https://github.com/ClementTsang/bottom/releases/download/$version/bottom_x86_64-pc-windows-msvc.zip'
$packageArgs = @{
packageName = $env:ChocolateyPackageName
@@ -9,12 +8,9 @@ $packageArgs = @{
unzipLocation = $toolsDir
fileType = 'exe'
url = $url
- url64bit = $url64
-
- checksum = '$hash_32'
+ checksum = '$hash_64'
checksumType = 'sha1'
- checksum64 = '$hash_64'
- checksumType64= 'sha1'
}
Install-ChocolateyZipPackage @packageArgs
+j \ No newline at end of file