Skip to content

Commit

Permalink
MYDISTRO
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Jul 22, 2024
1 parent 7f600b2 commit 8d36845
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile.gazebo
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
ARG ROS_DISTRO=humble
ARG PREFIX=
ARG MYDISTRO=ros

## =========================== Healthcheck builder ===============================

FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS healthcheck_builder

ARG ROS_DISTRO
ARG PREFIX
ARG MYDISTRO

SHELL ["/bin/bash", "-c"]

Expand Down Expand Up @@ -35,6 +37,7 @@ RUN MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \
FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder

ARG PREFIX
ARG MYDISTRO

# select bash as default shell
SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -71,6 +74,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-core

ARG ROS_DISTRO
ARG PREFIX
ARG MYDISTRO

# select bash as default shell
SHELL ["/bin/bash", "-c"]
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.hardware
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG ROS_DISTRO=humble
ARG MYDISTRO=ros
ARG PREFIX=

## =========================== Healthcheck builder ===============================
Expand All @@ -7,6 +8,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS healthcheck_builder

ARG ROS_DISTRO
ARG PREFIX
ARG MYDISTRO

SHELL ["/bin/bash", "-c"]

Expand Down Expand Up @@ -36,6 +38,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-base AS ros_builder

ARG ROS_DISTRO
ARG PREFIX
ARG MYDISTRO

SHELL ["/bin/bash", "-c"]

Expand All @@ -57,7 +60,7 @@ RUN git clone --depth 1 -b jazzy-devel https://github.com/husarion/rosbot_ros.gi
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install --from-paths src --ignore-src -y && \
MYDISTRO=${PREFIX:-ros}; MYDISTRO=${MYDISTRO//-/} && \
source /opt/$MYDISTRO/$MYDISTRO/$ROS_DISTRO/setup.bash && \
source /opt/$MYDISTRO/$ROS_DISTRO/setup.bash && \
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release && \
echo $(cat /ros2_ws/src/rosbot/package.xml | grep '<version>' | sed -r 's/.*<version>([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt && \
rm -rf build log
Expand All @@ -67,6 +70,7 @@ FROM ros:${PREFIX}${ROS_DISTRO}-ros-core

ARG ROS_DISTRO
ARG PREFIX
ARG MYDISTRO

SHELL ["/bin/bash", "-c"]

Expand Down

0 comments on commit 8d36845

Please sign in to comment.