diff --git a/bloom/ros_gz/README.md b/bloom/ros_gz/README.md index f0840eee8..eba4bf4e9 100644 --- a/bloom/ros_gz/README.md +++ b/bloom/ros_gz/README.md @@ -43,7 +43,6 @@ version the version of `ros_gz` released will be the latest one existing in the official `gbp -release repository`. The version would be the same but the release number will start on 1000. - ## 2. Initial setup To release a modified version of `ros_gz` which supports a different major @@ -53,31 +52,25 @@ version of gazebo, before running bloom some actions need to be taken: For a new official wrappers the notation used below correspond to `ros_ign-release`: - 1. Fork (manually or using gh) current gbp repository: + 1. Fork (or create a new repo with all the tags and branches) the current gbp repository: https://github.com/ros2-gbp/ros_ign-release Note: the same -release repository can obviously hosts multiple ROS 2 releases but can not have multipe Gazebo releases since the bloom templates are set to just one package name. +On the fork, the `rename-ros_gz-pkgs.bash` script will change the bloom templates to modify package names and inject the `GZ_VERSION` needed: + 1. Clone the new repo, go to the directory and run rename-gazebo-ros-pkgs.bash - Usage: `$ rename-ros_gz-pkgs.bash ` - Example: `$ rename-ros_gz-pkgs.bash garden humble` -The script supports to inject a custom RELEASE_REPO_URL that points to a bloom gbp -repository different than https://github.com/gazebo-release/ros_ign-release. +If several unofficial wrappers using different Gazebo releases are going to exist for the same ROS 2 distribution (i.e: Garden and Harmonic for ROS 2 Iron), the rename script supports to declare a conflict using the `GZ_RELEASE_TO_CONFLICT` variable: ``` -i.e use a https://github.com/gazebo-testing/ros_ign-gzharmonic-release as gbp testing repository - -RELEASE_REPO_URL=https://github.com/gazebo-testing/ros_ign-gzharmonic-release \ - ./bloom_from_special_env.bash \ - humble \ - garden \ - https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/replace_fortress_with_garden/00-replace-gz-fortress-with-garden.list +GZ_RELEASE_TO_CONFLICT=garden ./rename-ros_gz-pkgs.bash harmonic humble ``` - ### 2.2 Create a custom track in tracks.yml Copy the existing ROS 2 yaml track information and rename it to `${ros2}_gz${version}`. @@ -126,6 +119,19 @@ and invoke rocker with `--home` and `--user` flags to pass the credentials and customatizations needed for the bloom call. It will run the `bloom-release` command with the arguments required for the ros_gz wrappers. +The script supports to inject a custom RELEASE_REPO_URL that points to a bloom gbp +repository different than https://github.com/gazebo-release/ros_ign-release. + +``` +i.e use a https://github.com/gazebo-testing/ros_ign-gzharmonic-release as gbp testing repository + +RELEASE_REPO_URL=https://github.com/gazebo-testing/ros_ign-gzharmonic-release \ + ./bloom_from_special_env.bash \ + humble \ + garden \ + https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/replace_fortress_with_garden/00-replace-gz-fortress-with-garden.list +``` + ### 3.2 Launching jobs in the osrf buildfarm The previous step generates the metadata needed to build the debians but there is diff --git a/bloom/ros_gz/_check_metadata.bash b/bloom/ros_gz/_check_metadata.bash index da06ad3f9..1bf1db53f 100755 --- a/bloom/ros_gz/_check_metadata.bash +++ b/bloom/ros_gz/_check_metadata.bash @@ -15,7 +15,7 @@ TMP_DIR=$(mktemp -d) git clone -q "${RELEASE_REPO_URL}" "${TMP_DIR}" pushd "${TMP_DIR}" 2> /dev/null > /dev/null || exit DEBIAN_LATEST_TAG=$(git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | \ - grep "debian/ros-${ROS_DISTRO}" | \ + grep -v 'ros-ign-' | grep "debian/ros-${ROS_DISTRO}" \ tail -1 | sed 's:refs/tags/::') git checkout -q "${DEBIAN_LATEST_TAG}" if ! dpkg-parsechangelog -SSource 2> /dev/null | grep -q "gz${GAZEBO_DISTRO}"; then diff --git a/source-repo-scripts/source_changelog.bash b/source-repo-scripts/source_changelog.bash index eb733dbb4..71a8aea23 100755 --- a/source-repo-scripts/source_changelog.bash +++ b/source-repo-scripts/source_changelog.bash @@ -1,10 +1,18 @@ #!/bin/bash +# Generates a list of changes since the last tagged version. +# bash source_changelog.bash +# +# Optionally, the previous version can be provided # bash source_changelog.bash - -PREV_VER=$1 +# +# E.g. +# bash source_changelog.bash 3.0.0 git fetch --tags +PREV_VER=${1:-$(git describe --tags --abbrev=0 | sed 's/.*_//')} +echo "Changes since $PREV_VER" + ORIGIN_URL=$(git remote get-url origin) REPO=$(basename ${ORIGIN_URL%.git}) @@ -14,7 +22,7 @@ PREV_TAG=$(git tag | grep "_${PREV_VER}$") # Compare current branch to PREV_TAG BRANCH=$(git rev-parse --abbrev-ref HEAD) -COMMITS=$(git log ${BRANCH}...${PREV_TAG} --pretty=format:"%h") +COMMITS=$(git log ${BRANCH}...${PREV_TAG} --no-merges --pretty=format:"%h") for COMMIT in $COMMITS do