Skip to content

Add pre/post bump plugins #884

Open
Open
@Clockwork-Muse

Description

@Clockwork-Muse

Description

Currently, the ability to customize pre/post bump behavior is limited to script hooks. While these hooks are able to run arbitrary commands and scripts, their integration is limited, and they are not called if the --dry-run flag is passed.

I'd like to be able to write pre/post bump hooks in python and have them run in all cases, with some explicit api setup that also presents dry run/actual run information. One use case is a hook that modifies CI environments with variables presenting the current/next version (Eg, an equivalent of Semantic Release's semantic-release-ado plugin).

Possible Solution

It's possible to modify the current hook system to provide this information as an environment variable, but this would likely cause chaos unless the configuration file was changed as well to reflect this.

I would prefer some base class that could be implemented and then automatically loaded, as is the case for the existing (non-hook) plugins.
Providing a more general plugin system, supporting more events (As semantic-release does) may provide future additional benefits (although is also more complex).

Additional context

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions