From 801a8c0d1fb2209fcecc2393af40d4846973ebfb Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 24 Apr 2024 18:08:16 +0000 Subject: [PATCH 1/2] Specify branch to checkout --- Dockerfile/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile/Dockerfile b/Dockerfile/Dockerfile index 85df16cc..70419646 100644 --- a/Dockerfile/Dockerfile +++ b/Dockerfile/Dockerfile @@ -29,7 +29,7 @@ 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/ \ + && git clone https://github.com/ros-controls/gz_ros2_control/ -b ${ROS_DISTRO} \ && rosdep init && rosdep update \ && rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} From 9aa075da2fb85a4d08f84a6b634ab45568b8f809 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Wed, 24 Apr 2024 18:27:16 +0000 Subject: [PATCH 2/2] Make it work for every branch --- Dockerfile/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile/Dockerfile b/Dockerfile/Dockerfile index 70419646..cf7f13cc 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/ -b ${ROS_DISTRO} \ + && 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}