@@ -15,7 +15,10 @@ def main():
1515
1616 validate_changelog (version )
1717 validate_tooth_json (version )
18- validate_tooth_template_json (version )
18+ validate_tooth_template_json (version , "quickjs" )
19+ validate_tooth_template_json (version , "nodejs" )
20+ validate_tooth_template_json (version , "lua" )
21+ validate_tooth_template_json (version , "python" )
1922
2023
2124def get_args () -> Args :
@@ -60,22 +63,28 @@ def validate_tooth_json(version: str):
6063 ),
6164 content ,
6265 ):
63- raise Exception ("tooth.json has wrong version in gitea.litebds.com/LiteLDev/legacy-script-engine-lua" )
66+ raise Exception (
67+ "tooth.json has wrong version in gitea.litebds.com/LiteLDev/legacy-script-engine-lua"
68+ )
6469
6570 if not re .search (
6671 r"\"gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs\": \"{}\"" .format (
6772 version
6873 ),
6974 content ,
7075 ):
71- raise Exception ("tooth.json has wrong version in gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs" )
76+ raise Exception (
77+ "tooth.json has wrong version in gitea.litebds.com/LiteLDev/legacy-script-engine-quickjs"
78+ )
7279
73- def validate_tooth_template_json (version : str ):
74- with open ("tooth.template.json" , "r" , encoding = "utf-8" ) as f :
80+
81+ def validate_tooth_template_json (version : str , engine : str ):
82+ with open ("tooth." + engine + ".json" , "r" , encoding = "utf-8" ) as f :
7583 content = f .read ()
7684
7785 if not re .search (r"\"version\": \"{}\"" .format (version ), content ):
78- raise Exception ("tooth.template.json has wrong version" )
86+ raise Exception ("tooth." + engine + ".json has wrong version" )
87+
7988
8089if __name__ == "__main__" :
8190 main ()
0 commit comments