From d779b58029587b680bbb00362ff17159af2b944d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Wed, 24 Apr 2024 22:37:18 +0200 Subject: [PATCH] Dockerfile: Specify branch (#284) (cherry picked from commit c4842917f763da4c6c2e85676df920b797588a94) --- Dockerfile/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile/Dockerfile b/Dockerfile/Dockerfile index 325ced18..2da32969 100644 --- a/Dockerfile/Dockerfile +++ b/Dockerfile/Dockerfile @@ -29,7 +29,11 @@ RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o RUN mkdir -p /home/ros2_ws/src \ && cd /home/ros2_ws/src \ - && git clone https://github.com/ros-controls/gz_ros2_control/ \ + && if [ "${ROS_DISTRO}" = "rolling" ] ; then \ + git clone https://github.com/ros-controls/gz_ros2_control/; \ + else \ + git clone https://github.com/ros-controls/gz_ros2_control/ -b ${ROS_DISTRO}; \ + fi \ && rosdep init && rosdep update \ && rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO}