diff --git a/build_ros2.sh b/build_ros2.sh index 39a8b24..0a483f8 100644 --- a/build_ros2.sh +++ b/build_ros2.sh @@ -120,6 +120,35 @@ done VERSION=$(date +"%-y.%-m.%-d%H%M%S") echo "version=${VERSION}" > SAS_VERSION +#################################################################### +# libmarinholab-sas-core .deb (non-ROS C++ core, MarinhoLab/sas_cpp) +# +# The sas_core thin wrapper requires this .deb (find_package +# marinholab_sas_core), so it must be built and installed before +# colcon build below and before the ROS package .deb builds. +# It is not a colcon package (no package.xml), so it cannot go +# through the bloom loop below; it is built from its own +# debian/ packaging (dpkg-buildflags-based CMake rules). +# +# The full clone (no --depth) lets sas_cpp's tools/version.sh count +# commits since the monthly tag; tools/bump-changelog.sh (needs dch +# from devscripts, see prebuild_ros2.sh) stamps debian/changelog with +# that rolling YY.MM.NN version before dpkg-buildpackage. +# +# The .deb is written to tmp_ros2/ so the PPA extract step +# (cp -f /root/tmp_ros2/*.deb) ships it together with the +# ROS package .debs. +#################################################################### + +echo "Building libmarinholab-sas-core (sas_cpp @ ${SAS_CPP_REF:-main})" +git clone --branch "${SAS_CPP_REF:-main}" \ + https://github.com/MarinhoLab/sas_cpp.git +cd sas_cpp +bash tools/bump-changelog.sh +dpkg-buildpackage -us -uc -b +cd .. +dpkg -i ./libmarinholab-sas-core_*.deb + #################################################################### # Check with colcon first #################################################################### diff --git a/prebuild_ros2.sh b/prebuild_ros2.sh index becc1ab..3d3784f 100644 --- a/prebuild_ros2.sh +++ b/prebuild_ros2.sh @@ -7,6 +7,9 @@ sudo apt-get update -q sudo apt-get upgrade -y sudo apt-get autoremove -y sudo apt-get install -y dh-make dh-python python3-bloom +# dch (devscripts): needed by sas_cpp's tools/bump-changelog.sh, which +# stamps the rolling version into debian/changelog before dpkg-buildpackage +sudo apt-get install -y devscripts # sas_robot_driver_gazebo sudo apt-get install libgz-transport13-dev