Skip to content

Commit 5c4bbca

Browse files
sort itavailable_ros2_types and built_packages so that the build result order is reproducible (#934) (#936)
(cherry picked from commit 328798c) Co-authored-by: Amilcar Lucas <[email protected]>
1 parent d3f9ec4 commit 5c4bbca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extras/library_generation/library_generation.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,14 @@ fi
233233
######## Generate extra files ########
234234
find firmware/mcu_ws/ros2 \( -name "*.srv" -o -name "*.msg" -o -name "*.action" \) | awk -F"/" '{print $(NF-2)"/"$NF}' > /project/available_ros2_types
235235
find firmware/mcu_ws/extra_packages \( -name "*.srv" -o -name "*.msg" -o -name "*.action" \) | awk -F"/" '{print $(NF-2)"/"$NF}' >> /project/available_ros2_types
236+
# sort it so that the result order is reproducible
237+
sort -o /project/available_ros2_types /project/available_ros2_types
236238

237239
cd firmware
238240
echo "" > /project/built_packages
239241
for f in $(find $(pwd) -name .git -type d); do pushd $f > /dev/null; echo $(git config --get remote.origin.url) $(git rev-parse HEAD) >> /project/built_packages; popd > /dev/null; done;
242+
# sort it so that the result order is reproducible
243+
sort -o /project/built_packages /project/built_packages
240244

241245
######## Fix permissions ########
242246
sudo chmod -R 777 .

0 commit comments

Comments
 (0)