fix(ariadne): include AST adapter in preparation runfiles
This commit is contained in:
@@ -16,5 +16,8 @@ rust_binary(
|
||||
sh_binary(
|
||||
name = "extract_and_decompile",
|
||||
srcs = ["extract-and-decompile.sh"],
|
||||
data = ["extract-tools.nix"],
|
||||
data = [
|
||||
"extract-tools.nix",
|
||||
"tools/export-renpy-ast.py",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -175,6 +175,31 @@ source_log_relative() {
|
||||
fi
|
||||
}
|
||||
|
||||
ariadne_file() {
|
||||
local relative=$1
|
||||
local candidate
|
||||
if [[ -n "${BUILD_WORKSPACE_DIRECTORY:-}" ]]; then
|
||||
candidate=$BUILD_WORKSPACE_DIRECTORY/src/ariadne/$relative
|
||||
if [[ -f "$candidate" ]]; then
|
||||
printf '%s\n' "$candidate"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
candidate=$script_dir/$relative
|
||||
if [[ -f "$candidate" ]]; then
|
||||
printf '%s\n' "$candidate"
|
||||
return
|
||||
fi
|
||||
if [[ -n "${RUNFILES_DIR:-}" ]]; then
|
||||
candidate=$RUNFILES_DIR/_main/src/ariadne/$relative
|
||||
if [[ -f "$candidate" ]]; then
|
||||
printf '%s\n' "$candidate"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
printf '%s\n' "$script_dir/$relative"
|
||||
}
|
||||
|
||||
launcher_prefix() {
|
||||
local log_relative=$1
|
||||
printf '%s\n' "${log_relative%%/*}"
|
||||
@@ -240,7 +265,7 @@ export_ast() {
|
||||
local launcher_root python adapter output log_file namespace
|
||||
launcher_root=$(launcher_root_for "$log_relative")
|
||||
python=$(bundled_python_for "$launcher_root")
|
||||
adapter=$script_dir/tools/export-renpy-ast.py
|
||||
adapter=$(ariadne_file tools/export-renpy-ast.py)
|
||||
namespace=$(launcher_prefix "$log_relative")
|
||||
output=$ast_dir/${log_relative%.*}.json
|
||||
log_file=$logs_dir/ast-${log_relative//\//__}.log
|
||||
|
||||
Reference in New Issue
Block a user