I tried looking for something about this in the docs or existing issues, but didn't succeed probably due to me needing to know the right words... I would like to know inside of a lifecycle hook (for instance, prerelease) what kind of release I am creating (patch, minor, major). Is there an environment variable or something I can use to find that out? If not, what would be your approach about this?
As a specific example: In my prerelease script I run a dry-run release to retrieve the changelog. In minor or major releases this leads to wrong version numbers because I have one single prerelease hook that does the dry-run without forcing a version type.
I tried looking for something about this in the docs or existing issues, but didn't succeed probably due to me needing to know the right words... I would like to know inside of a lifecycle hook (for instance,
prerelease
) what kind of release I am creating (patch, minor, major). Is there an environment variable or something I can use to find that out? If not, what would be your approach about this?As a specific example: In my prerelease script I run a dry-run release to retrieve the changelog. In minor or major releases this leads to wrong version numbers because I have one single prerelease hook that does the dry-run without forcing a version type.