mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-29 07:14:07 +08:00
airframes.xml and all_events.json.xz on the px4-travis S3 bucket have been stale since October 2025 because package_build_artifacts.sh had wrong paths for both files after the migration from metadata.yml to build_all_targets.yml. - airframes.xml: SITL builds produce it under docs/, not at the build root (only NuttX does that). Use explicit file checks to try both. - all_events.json.xz: was copied flat into artifacts/$build_dir/ but the _general section expected it under events/. Preserve the subdirectory so the copy to _general/ actually finds the file. - Remove duplicate cp lines that were misleadingly commented as "ROS 2 msgs". - Fail with an error when critical _general metadata files are missing rather than silently producing incomplete artifacts. Also uploaded fresh metadata to S3 manually to unblock Flight Review. Fixes #26713 Signed-off-by: Ramon Roche <mrpollo@gmail.com>
61 lines
2.4 KiB
Bash
Executable File
61 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir artifacts
|
|
cp **/**/*.px4 artifacts/ 2>/dev/null || true
|
|
cp **/**/*.elf artifacts/ 2>/dev/null || true
|
|
for build_dir_path in build/*/ ; do
|
|
build_dir_path=${build_dir_path::${#build_dir_path}-1}
|
|
build_dir=${build_dir_path#*/}
|
|
mkdir -p artifacts/$build_dir
|
|
find artifacts/ -maxdepth 1 -type f -name "*$build_dir*"
|
|
# Airframe (NuttX: build root, SITL: docs/ subdirectory)
|
|
airframes_src=""
|
|
if [ -f "$build_dir_path/airframes.xml" ]; then
|
|
airframes_src="$build_dir_path/airframes.xml"
|
|
elif [ -f "$build_dir_path/docs/airframes.xml" ]; then
|
|
airframes_src="$build_dir_path/docs/airframes.xml"
|
|
fi
|
|
if [ -n "$airframes_src" ]; then
|
|
cp "$airframes_src" "artifacts/$build_dir/"
|
|
fi
|
|
# Parameters
|
|
cp $build_dir_path/parameters.xml artifacts/$build_dir/ 2>/dev/null || true
|
|
cp $build_dir_path/parameters.json artifacts/$build_dir/ 2>/dev/null || true
|
|
cp $build_dir_path/parameters.json.xz artifacts/$build_dir/ 2>/dev/null || true
|
|
# Actuators
|
|
cp $build_dir_path/actuators.json artifacts/$build_dir/ 2>/dev/null || true
|
|
cp $build_dir_path/actuators.json.xz artifacts/$build_dir/ 2>/dev/null || true
|
|
# Events
|
|
mkdir -p artifacts/$build_dir/events/
|
|
cp $build_dir_path/events/all_events.json.xz artifacts/$build_dir/events/ 2>/dev/null || true
|
|
ls -la artifacts/$build_dir
|
|
echo "----------"
|
|
done
|
|
|
|
if [ -d artifacts/px4_sitl_default ]; then
|
|
# general metadata (used by Flight Review and other downstream consumers)
|
|
mkdir -p artifacts/_general/
|
|
# Airframe
|
|
if [ -f artifacts/px4_sitl_default/airframes.xml ]; then
|
|
cp artifacts/px4_sitl_default/airframes.xml artifacts/_general/
|
|
else
|
|
echo "Error: expected 'artifacts/px4_sitl_default/airframes.xml' not found." >&2
|
|
exit 1
|
|
fi
|
|
# Parameters
|
|
cp artifacts/px4_sitl_default/parameters.xml artifacts/_general/
|
|
cp artifacts/px4_sitl_default/parameters.json artifacts/_general/
|
|
cp artifacts/px4_sitl_default/parameters.json.xz artifacts/_general/
|
|
# Actuators
|
|
cp artifacts/px4_sitl_default/actuators.json artifacts/_general/
|
|
cp artifacts/px4_sitl_default/actuators.json.xz artifacts/_general/
|
|
# Events
|
|
if [ -f artifacts/px4_sitl_default/events/all_events.json.xz ]; then
|
|
cp artifacts/px4_sitl_default/events/all_events.json.xz artifacts/_general/
|
|
else
|
|
echo "Error: expected 'artifacts/px4_sitl_default/events/all_events.json.xz' not found." >&2
|
|
exit 1
|
|
fi
|
|
ls -la artifacts/_general/
|
|
fi
|