diff --git a/.github/workflows/action-test.yml b/.github/workflows/action-test.yml index 7d65a35..3979563 100644 --- a/.github/workflows/action-test.yml +++ b/.github/workflows/action-test.yml @@ -103,7 +103,7 @@ jobs: - name: Test output directory run: test $(ls -1 output | wc -l) -eq 6 - action-test-with-unique-version: + action-test-with-version: runs-on: ubuntu-20.04 steps: - name: Checkout this repository @@ -122,13 +122,13 @@ jobs: mv examples/rclpy/topics pytopics || true rm -rf examples test || true - - name: Test the action with unique version + - name: Test the action with version uses: ./ with: ros2-distro: foxy - unique-version: true + version: 1.1.0 - - name: Test unique version + - name: Test version run: | (for PACKAGE in $(ls) do diff --git a/action.yml b/action.yml index d55457b..f4d2db4 100644 --- a/action.yml +++ b/action.yml @@ -13,8 +13,8 @@ inputs: description: 'The output directory of build results.' required: false default: 'package' - unique-version: - description: 'Make the package version unique by using a timestamp for the Debian revision number.' + version: + description: 'The version / debian increment.' required: false default: 'false' runs: @@ -24,5 +24,5 @@ runs: run: bash ${{ github.action_path }}/scripts/setup-dependencies.bash ${{ inputs.ros2-distro }} shell: bash - name: Build Debian packages - run: bash ${{ github.action_path }}/scripts/build-debian.bash ${{ inputs.ros2-distro }} ${{ inputs.output-dir }} ${{ inputs.unique-version }} + run: bash ${{ github.action_path }}/scripts/build-debian.bash ${{ inputs.ros2-distro }} ${{ inputs.output-dir }} ${{ inputs.version }} shell: bash diff --git a/scripts/build-debian.bash b/scripts/build-debian.bash index b99f185..d6d8e87 100644 --- a/scripts/build-debian.bash +++ b/scripts/build-debian.bash @@ -1,6 +1,6 @@ ROS2_DISTRO="$1" OUTPUT_DIR="$2" -UNIQUE_VERSION="$3" +VERSION="$3" ROOT_DIR=$(pwd) @@ -19,11 +19,11 @@ do source /opt/ros/$ROS2_DISTRO/setup.bash || exit $? # Generate Debian rules - if [ "$UNIQUE_VERSION" == "false" ] + if [ "$VERSION" == "false" ] then bloom-generate rosdebian --ros-distro "$ROS2_DISTRO" || exit $? else - bloom-generate rosdebian --ros-distro "$ROS2_DISTRO" -i $(date +%s) || exit $? + bloom-generate rosdebian --ros-distro "$ROS2_DISTRO" -i "$VERSION" || exit $? fi # Build package using fakeroot