From 8d104491c424ec65359fe5b63874bf2bee2e077c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20L=C3=BCdtke?= <727227+mathias-luedtke@users.noreply.github.com> Date: Fri, 2 Jun 2023 21:46:08 +0200 Subject: [PATCH] Support ROS_DISTRO=false --- industrial_ci/src/ros.sh | 3 ++- industrial_ci/src/workspace.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/industrial_ci/src/ros.sh b/industrial_ci/src/ros.sh index a59280c0a..fa7d0196c 100644 --- a/industrial_ci/src/ros.sh +++ b/industrial_ci/src/ros.sh @@ -96,7 +96,8 @@ function _set_ros_defaults { _ros2_defaults "jammy" ;; "false") - unset ROS_DISTRO + export BUILDER=${BUILDER:-colcon} + ;; *) ici_error "ROS_DISTRO '$ROS_DISTRO' is not supported" diff --git a/industrial_ci/src/workspace.sh b/industrial_ci/src/workspace.sh index a2d156ef7..3762b7ca6 100644 --- a/industrial_ci/src/workspace.sh +++ b/industrial_ci/src/workspace.sh @@ -133,7 +133,7 @@ function ici_init_apt { ici_apt_install "${debs_default[@]}" fi - if [ -n "$ROS_DISTRO" ]; then + if [ -n "$ROS_DISTRO" ] && [ "$ROS_DISTRO" != false ]; then local current_repository_path current_repository_path="$(apt-cache policy "ros-$ROS_DISTRO-ros-core" 2> /dev/null | grep -Eo "[^ ]+://[^ ]+")" || true ici_set_ros_repository_path "$current_repository_path" @@ -322,7 +322,7 @@ function ici_setup_rosdep { if [ "$ROS_DISTRO" = "indigo" ] || [ "$ROS_DISTRO" = "jade" ]; then ici_apt_install "ros-$ROS_DISTRO-roslib" - else + elif [ "$ROS_DISTRO" != false ] ici_apt_install "ros-$ROS_DISTRO-ros-environment" fi @@ -334,7 +334,7 @@ function ici_setup_rosdep { fi update_opts=() - if [ -z "${ROSDISTRO_INDEX_URL:-}" ]; then + if [ -z "${ROSDISTRO_INDEX_URL:-}" ] && [ "$ROS_DISTRO" != false ]; then update_opts+=(--rosdistro "$ROS_DISTRO") fi if [ "$ROS_VERSION_EOL" = true ]; then