update helper scripts and more

This commit is contained in:
Dengke Tang
2023-02-27 15:38:45 -08:00
parent 5d137a66d6
commit e7da4c56b1
3 changed files with 18 additions and 15 deletions
+1 -6
View File
@@ -1,7 +1,6 @@
import argparse
import os
import subprocess
import xml.dom.minidom
parser = argparse.ArgumentParser(description='PECL Package generator')
@@ -38,11 +37,7 @@ subprocess.run(['python3', f'{TOOLS_DIR}/prepare_pecl_package_xml.py', '--name',
try:
with open('package.xml', 'r') as f:
package_xml = f.read()
doc = xml.dom.minidom.parse('package.xml')
doc.encoding = 'UTF-8'
xml_str = doc.toprettyxml(indent=' ', newl='')
with open('package.xml', 'w') as f:
f.write(xml_str)
subprocess.run(['tidy', '-xml', '-m', '-i', 'package.xml'], check=True)
subprocess.run(['pear', 'package-validate'], check=True)
subprocess.run(['pear', 'package'], check=True)
except subprocess.CalledProcessError as e: