product-os / versionist

Flexible CHANGELOG generation toolkit that adapts to your commit conventions
44 stars 15 forks source link

Deduce submodule update versions automatically #210

Closed alexgg closed 2 years ago

alexgg commented 2 years ago

The nested changelog support currently needs to be provided with the version range on the commit body, similarly to:

Update from to

This is cumbersome and does not work well with tools that automatically update submodule dependencies like renovatebot.

This commit keeps the legacy behaviour but will extract the version range from git metadata when not provided. This new behaviour can be used by specifyng a commit body similar to:

Update

Change-type: patch Signed-off-by: Alex Gonzalez alexg@balena.io

alexgg commented 2 years ago

Testing details:

jobs:

versionist: name: Run versionist if: "!contains(github.event.head_commit.author.name, 'versionist')" # Ignore push events made by the service account runs-on: ubuntu-latest outputs: # (optional) Only if you want to use them in next jobs version: ${{ steps.versionist.outputs.version }} # version: project's version after running versionist updated: ${{ steps.versionist.outputs.updated }} # updated: true if the version has been updated steps:

With the above, the device repostiory dependencies are updated and the changelog is nested correctly.

alexgg commented 2 years ago

@balena-ci I self-certify!