aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/extract.py
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/lib/extract.py')
-rwxr-xr-xcodegen/lib/extract.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py
index 6bf2d57f..f7c78d29 100755
--- a/codegen/lib/extract.py
+++ b/codegen/lib/extract.py
@@ -117,7 +117,7 @@ def get_pixlyzer_data(version_id: str, category: str):
# TODO: right now this False is hard-coded, it should retry with this
# enabled if # initially getting the data fails
- if False or (os.path.exists(target_dir) and not os.path.exists(f'{target_dir}/{category}.min.json')):
+ if True or (os.path.exists(target_dir) and not os.path.exists(f'{target_dir}/{category}.min.json')):
print('Downloading', category, 'from pixlyzer-data.')
data = requests.get(f'https://gitlab.com/Bixilon/pixlyzer-data/-/raw/master/version/{version_id}/{category}.min.json?inline=false').text
try:
@@ -219,6 +219,8 @@ def get_pixlyzer_data(version_id: str, category: str):
pom_xml = open(f'{pixlyzer_dir}/pom.xml', 'r').read()
pom_xml = re.sub(
'<dependencies>.*?</dependencies>', f'<dependencies>{pom_xml_dependencies}</dependencies>', pom_xml, flags=re.DOTALL)
+ pom_xml = re.sub(
+ '<minecraft\.version>.*?</minecraft\.version>', f'<minecraft.version>{version_id}</minecraft.version>', pom_xml, flags=re.DOTALL)
open(f'{pixlyzer_dir}/pom.xml', 'w').write(pom_xml)
# compile