1
0
forked from 0ad/0ad

Support calling checkrefs.py from other dirs

This commit is contained in:
Dunedan 2024-08-25 17:07:55 +02:00
parent f22d0d899e
commit 39f2889cf7
Signed by untrusted user: Dunedan
GPG Key ID: 885B16854284E0B2
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ pipeline {
stage("Data checks") {
steps {
sh "cd source/tools/entity/ && python3 checkrefs.py -tax"
sh "python3 source/tools/entity/checkrefs.py -tax"
}
}
}

View File

@ -131,14 +131,14 @@ class CheckRefs:
if args.check_unused:
self.check_unused()
if args.validate_templates:
sys.path.append("../xmlvalidator/")
sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator"))
from validate_grammar import RelaxNGValidator
validate = RelaxNGValidator(self.vfs_root, self.mods)
if not validate.run():
self.inError = True
if args.validate_actors:
sys.path.append("../xmlvalidator/")
sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator"))
from validator import Validator
validator = Validator(self.vfs_root, self.mods)