!104 add the relative_path argument to adapter the root_build_dir

Merge pull request !104 from chuxuezhe11/master
This commit is contained in:
openharmony_ci 2022-06-29 12:30:02 +00:00 committed by Gitee
commit f872868cd6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 12 additions and 2 deletions

View File

@ -37,9 +37,11 @@ if __name__ == '__main__':
help='the module path')
PARSER_INST.add_argument('--out-file',
help='js output file')
PARSER_INST.add_argument('--relative-path',
help='the code root path relative the root_build_dir')
INPUT_ARGUMENTS = PARSER_INST.parse_args()
BUILD_PATH = os.path.abspath(os.path.join(os.getcwd(), "../.."))
BUILD_PATH = os.path.abspath(os.path.join(os.getcwd(), INPUT_ARGUMENTS.relative_path))
os.chdir(("%s" + INPUT_ARGUMENTS.module_path) % BUILD_PATH)
NODE_PATH = '../../../../prebuilts/build-tools/common/nodejs/\
node-v12.18.4-linux-x64/bin/node'
@ -55,4 +57,4 @@ typescript/bin/tsc'
CMD_INST = shutil.rmtree('./out')
exit(0)
exit(0)

View File

@ -26,6 +26,8 @@ action("build_ts_js") {
rebase_path("/base/compileruntime/js_api_module/convertxml"),
"--out-file",
rebase_path("./out/js_convertxml.js"),
"--relative-path",
rebase_path("//", root_build_dir),
]
depfile = "$target_gen_dir/$target_name.d"
outputs = [ target_out_dir + "/js_convertxml.js" ]

View File

@ -25,6 +25,8 @@ action("build_ts_js") {
rebase_path("/base/compileruntime/js_api_module/uri"),
"--out-file",
rebase_path("./out/js_uri.js"),
"--relative-path",
rebase_path("//", root_build_dir),
]
depfile = "$target_gen_dir/$target_name.d"
outputs = [ target_out_dir + "/js_uri.js" ]

View File

@ -25,6 +25,8 @@ action("build_ts_js") {
rebase_path("/base/compileruntime/js_api_module/url"),
"--out-file",
rebase_path("./out/js_url.js"),
"--relative-path",
rebase_path("//", root_build_dir),
]
depfile = "$target_gen_dir/$target_name.d"
outputs = [ target_out_dir + "/js_url.js" ]

View File

@ -27,6 +27,8 @@ action("build_ts_js") {
rebase_path("/base/compileruntime/js_api_module/xml"),
"--out-file",
rebase_path("./out/js_xml.js"),
"--relative-path",
rebase_path("//", root_build_dir),
]
depfile = "$target_gen_dir/$target_name.d"
outputs = [ target_out_dir + "/js_xml.js" ]