@@ -104,9 +104,7 @@ def create_debian_package(version):
104
104
control_content = Path ("packaging/debian/control" ).read_text (encoding = "utf-8" )
105
105
# Replace any existing version with the new one
106
106
control_content = re .sub (r"Version:\s+[^\s]+" , f"Version: { version } " , control_content )
107
- control_content = control_content .replace (
108
- "Architecture: amd64" , f"Architecture: { deb_arch } "
109
- )
107
+ control_content = control_content .replace ("Architecture: amd64" , f"Architecture: { deb_arch } " )
110
108
111
109
control_file = debian_dir / "control"
112
110
control_file .write_text (control_content , encoding = "utf-8" )
@@ -134,10 +132,7 @@ def create_debian_package(version):
134
132
Path (deb_filename ).parent .mkdir (parents = True , exist_ok = True )
135
133
136
134
result = subprocess .run ( # noqa: S603,S607
137
- ["dpkg-deb" , "--build" , str (pkg_dir ), deb_filename ],
138
- check = True ,
139
- capture_output = True ,
140
- text = True ,
135
+ ["dpkg-deb" , "--build" , str (pkg_dir ), deb_filename ], check = True , capture_output = True , text = True
141
136
)
142
137
print (f"stdout: { result .stdout } " )
143
138
@@ -195,10 +190,7 @@ def create_apt_repository(_version, deb_packages):
195
190
196
191
# Create Packages file
197
192
result = subprocess .run ( # noqa: S603,S607
198
- ["dpkg-scanpackages" , f"pool/{ component } " , "/dev/null" ],
199
- capture_output = True ,
200
- text = True ,
201
- check = True ,
193
+ ["dpkg-scanpackages" , f"pool/{ component } " , "/dev/null" ], capture_output = True , text = True , check = True
202
194
)
203
195
204
196
# Write Packages file for each architecture
@@ -233,9 +225,7 @@ def create_apt_repository(_version, deb_packages):
233
225
# Add checksums for all architectures
234
226
all_packages_files = []
235
227
for arch in architectures :
236
- all_packages_files .extend (
237
- [f"{ component } /binary-{ arch } /Packages" , f"{ component } /binary-{ arch } /Packages.gz" ]
238
- )
228
+ all_packages_files .extend ([f"{ component } /binary-{ arch } /Packages" , f"{ component } /binary-{ arch } /Packages.gz" ])
239
229
240
230
# MD5Sum (keeping for compatibility even though it's insecure)
241
231
release_content += "MD5Sum:\n "
@@ -300,9 +290,7 @@ def update_chocolatey_package(version, checksum):
300
290
content = re .sub (r"\$version\s*=\s*'[^']*'" , f"$version = '{ version } '" , content )
301
291
content = content .replace ("REPLACE_WITH_ACTUAL_CHECKSUM" , checksum )
302
292
# Fix the URL to match the actual binary filename format
303
- content = re .sub (
304
- r"eir-\$version-windows-amd64\.exe" , "eir-$version-windows-x86_64.exe" , content
305
- )
293
+ content = re .sub (r"eir-\$version-windows-amd64\.exe" , "eir-$version-windows-x86_64.exe" , content )
306
294
install_path .write_text (content , encoding = "utf-8" )
307
295
308
296
print (f"Updated Chocolatey package files for version { version } " )
0 commit comments