ci: Explicitly set the encoding as UTF-8 in the python script since that is not the windows default encoding [skip ci]
This commit is contained in:
@@ -41,10 +41,9 @@ jobs:
|
|||||||
python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }}
|
python "./deployment/chocolatey/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/chocolatey/chocolateyinstall.ps1.template" "./deployment/chocolatey/tools/chocolateyinstall.ps1" ${{ env.WINDOWS_SHA }}
|
||||||
|
|
||||||
# Publish to Chocolatey
|
# Publish to Chocolatey
|
||||||
cd ./deployment/chocolatey
|
cd ./deployment/chocolatey/
|
||||||
choco pack
|
choco pack
|
||||||
echo y | choco install managarr -dv -s .
|
echo y | choco install managarr -dv -s .
|
||||||
refreshenv
|
|
||||||
$version = managarr --version
|
$version = managarr --version
|
||||||
$version = $version -replace " ", "."
|
$version = $version -replace " ", "."
|
||||||
choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }};
|
choco push $version.nupkg -s https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }};
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ print(" TEMPLATE PATH: %s" % template_file_path)
|
|||||||
print(" SAVING AT: %s" % generated_file_path)
|
print(" SAVING AT: %s" % generated_file_path)
|
||||||
print(" HASH: %s" % hash_64)
|
print(" HASH: %s" % hash_64)
|
||||||
|
|
||||||
with open(template_file_path, "r") as template_file:
|
with open(template_file_path, "r", encoding="utf-8") as template_file:
|
||||||
template = Template(template_file.read())
|
template = Template(template_file.read())
|
||||||
substitute = template.safe_substitute(version=version, hash_64=hash_64)
|
substitute = template.safe_substitute(version=version, hash_64=hash_64)
|
||||||
print("\n================== Generated package file ==================\n")
|
print("\n================== Generated package file ==================\n")
|
||||||
print(substitute)
|
print(substitute)
|
||||||
print("\n============================================================\n")
|
print("\n============================================================\n")
|
||||||
|
|
||||||
with open(generated_file_path, "w") as generated_file:
|
with open(generated_file_path, "w", encoding="utf-8") as generated_file:
|
||||||
generated_file.write(substitute)
|
generated_file.write(substitute)
|
||||||
|
|||||||
Reference in New Issue
Block a user