Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not require conventional commits for releases #2528

Closed
wants to merge 1 commit into from
Closed

fix: do not require conventional commits for releases #2528

wants to merge 1 commit into from

Conversation

achingbrain
Copy link
Contributor

@achingbrain achingbrain commented Apr 8, 2020

Description

Removes the requirement to use conventional commits for releases because it prevents you from releasing 0.x.x of a module.

Motivation and Context

Some projects (such as the one I'm working on at the moment) want to use lerna to coordinate releases across multiple modules but cannot release v1 due to reasons out of our control - there is no code requirement to use version numbers generated by the conventional commits module, a manually chosen version number works just as well.

Fixes #2521

How Has This Been Tested?

I did a release of https://github.com/ipfs/js-ipfs - it prompted me to choose versions for the various packages, I did, they were published to npm, github releases and changelogs were created as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Removes the requirement to use conventional commits for releases because
it prevents you from releasing 0.x.x of a module.

You can use conventional commits and still have a pre-v1 version number.
Some projects (such as the one I'm working on at the moment) want to use
lerna to coordinate releases across multiple modules but cannot release
v1 due to reasons out of our control - there is no code requirement to
use version numbers generated by the conventional commits module, a
manually chosen verison number works just as well.

Fixes #2521
@achingbrain
Copy link
Contributor Author

achingbrain commented Apr 8, 2020

I see lots of unrelated looking test failures locally, lots of:

    ValidationError: Branch 'master' doesn't exist in remote 'origin'.
    If this is a new branch, please make sure you push it to the remote first.

Might be because I'm running the tests in a fork?

@achingbrain
Copy link
Contributor Author

@evocateur do you have any interest in this feature? I'm more than willing to investigate the test failures to finish this off but could you give me a nod as to whether this will be merged?

@evocateur
Copy link
Member

@achingbrain Sorry for the delay.

I don't see this happening, chiefly because I don't understand how you proposed to read the minds of developers to create meaningful release notes without --conventional-commits enabled. I just merged #2486, does this not cover your use case? It enables 0.x. ranges to stay 0.x despite breaking changes when using --conventional-commits.

The tests are failing because your proposed patch is now generating changelogs by default for every release, implicitly depending on conventional commits to produce anything of value, yet not guaranteeing the intent with the required --conventional-commits flag.

@achingbrain
Copy link
Contributor Author

You don't have to read their minds, just their commit messages. Maybe this PR has a bad title, the idea was to still use conventional commits, just don't try to guess the new version number.

Anyway the point is moot - it looks like #2486 solves my problem, I'll give that a go.

@achingbrain achingbrain deleted the feat/do-not-require-conventional-commits-for-releases branch May 29, 2020 14:12
@ahmed2m
Copy link

ahmed2m commented Sep 23, 2020

@evocateur There is no workaround or any flag to still generate changelogs according to the detected or defined convention and prompting the user for each package bump instead of relying on the logic of the conventional commits/semVer?

I get the logical reasoning behind using the conventional commits in the first place is doing everything smoothly without developer interaction but there should be an option for an edge case or for someone who don't want to follow the semVer approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lerna publish with pre-v1 modules
3 participants