Skip to content

Commit

Permalink
Fixing ZXP update
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSouchet committed Dec 9, 2024
1 parent 404d5d2 commit 71c9e6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/quadpype/hosts/aftereffects/api/checksums
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ C07F1436D9ED900B3E94605183DB29E82301191D9DC3D55917CF9A68842E6F92:.debug
D6CCD9DD044B02E4F2ED1B49E9C083D823D6E3940F9825DD932D07C8B0229C78:css\boilerplate.css
0D183A454C941E5C937DCFDABFFE257F4FBB49BD418DF200AB6C01A39836BA27:css\styles.css
1CE5197F378AD02BCE717B29CB25E7423AFA2E6D22996BABB7297E025D192B4F:css\topcoat-desktop-dark.min.css
F7B0CEE06DDED97BDD89D21B246F80285AC2CFAD205966F39A39F4C644D4D5B6:CSXS\manifest.xml
42E08E934D19F0A99497D9C721FBEF8102833A1AC6A5A331AB7D1708B38E5C15:CSXS\manifest.xml
9F51E857F342D27FF05A97A09E96401EE7EB901C978A31F560F0A49C3A6592FB:icons\ayon_logo.png
A1B1F026B3BB43F4801DB4FAB5CDAE7C1DDCABA064FEDB0A227F633F32EB4F61:icons\iconDarkNormal.png
6C04A66B67CCDA76D4689BF5F80DFB46377E8B3A652CFC5B3D268E9E27DC9853:icons\iconDarkRollover.png
Expand Down
2 changes: 1 addition & 1 deletion src/quadpype/hosts/photoshop/api/checksums
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ E971793EC8E773D2D9FAAC01A35C94DEA2864BAD426460CA025285B5B78C943B:client\client.j
FD0E8BED2FA88E12F5D49646944793C134428F80311BC03F3BCB1196CE3AF0AD:client\loglevel.min.js
61E9E273ADF6E290D9E6911500D44F2AB02DAEFCD902888106017735590E26C1:client\wsrpc.js
78E2A27896C24A4AF1D232AAC321E09B8995CC9A86C9ABB19C8A97A861946F41:client\wsrpc.min.js
1630FED4CC9468A7C9DC3B1F8E5CE3159E3583579C1FE7CB35D4DD877C1A3856:CSXS\manifest.xml
6FB11BEBA1616F4C3F807811375E874CB2B1505A06B8ED71949BE6D2D429139D:CSXS\manifest.xml
52437DE708F4A7153DB0A0A5DB66658C2A12F3A8673054E87C7B84895D4CE584:host\index.jsx
CC7DDC2DA053A7B922BC0DA7023F734BB80D6E00B87926715206D530664BC415:host\json.js
D6F0B54C43673F18785AE31D4659289CCB08D9C79C1BBEF588ACBA8C9DBD96F4:host\JSX.js
Expand Down
8 changes: 7 additions & 1 deletion src/tools/_lib/zxp/bump_xmp_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import xml.etree.ElementTree as ET
from xml.etree import ElementTree


class CommentedTreeBuilder(ElementTree.TreeBuilder):
""" This class will retain remarks and comments"""
def comment(self, data):
self.start(ElementTree.Comment, {})
self.data(data)
self.end(ElementTree.Comment)


def bump_xml_version(xml_path):
"""
Upgrade the version of given xml
Expand All @@ -29,7 +31,11 @@ def bump_xml_version(xml_path):
root.attrib['ExtensionBundleVersion'] = new_version

# Write the XML
tree.write(xml_path, encoding='UTF-8', xml_declaration=True)
file_content = ET.tostring(root, encoding='UTF-8', xml_declaration=True)
file_content = file_content.replace(b"\r\n", b"\n")
with open(xml_path, 'wb') as open_file:
open_file.write(file_content)

print(f'Updated ExtensionBundleVersion to {new_version}')


Expand Down

0 comments on commit 71c9e6a

Please sign in to comment.