Skip to content

Commit

Permalink
Support ROS_DISTRO=false fully
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Jun 2, 2023
1 parent afbf77f commit b08fd05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion industrial_ci/src/ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ function _set_ros_defaults {
_ros2_defaults "jammy"
;;
"false")
unset ROS_DISTRO
export BUILDER=${BUILDER:-colcon}
export ROS_PYTHON_VERSION=${ROS_PYTHON_VERSION:-3}
;;
*)
ici_error "ROS_DISTRO '$ROS_DISTRO' is not supported"
Expand Down
6 changes: 3 additions & 3 deletions industrial_ci/src/workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 ]; then
ici_apt_install "ros-$ROS_DISTRO-ros-environment"
fi

Expand All @@ -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
Expand Down

0 comments on commit b08fd05

Please sign in to comment.