Skip to content

[Bug] Semver rules & current branch #24

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

Closed
2 tasks
XeroxDev opened this issue Apr 21, 2022 · 2 comments
Closed
2 tasks

[Bug] Semver rules & current branch #24

XeroxDev opened this issue Apr 21, 2022 · 2 comments

Comments

@XeroxDev
Copy link

Hey! I noticed two bugs while setting up this action and testing it.

  • 1. The action fails while pushing due to fatal: couldn't find remote ref master
  • 2. Pre-Release generates invalid/wrong semver version
  1. I've the following step
      - name: Create bump and changelog
        uses: commitizen-tools/commitizen-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          changelog_increment_filename: body.md
          prerelease: ${{ steps.is_main.outputs.prerelease_type }}

and everything works expect the pushing. This is because the action tries to push to master, but I'm using main. Sadly I can't hard-code it, because I'm listening to multiple branches (for pre-release branches)

  1. While testing I've noticed it generates for a (beta) pre-release the following version 1.1.0b0 but it should be 1.1.0-beta(.0) instead (see semver rules)
    In their example for which version is lower and higher, they have the following Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

I hope it's okay, that I've not split this issue in two, that's why I've created checkboxes.

@XeroxDev
Copy link
Author

Short update: I was right and this is due to commitizen itself and also found the (open) issue commitizen-tools/commitizen#150 so this can be ignored in this issue.

@woile
Copy link
Member

woile commented Mar 3, 2023

This action uses the CURRENT_BRANCH variable now. Or you can specify it in the action.

The problem with semver is part of commitizen, as you pointed out.

@woile woile closed this as completed Mar 3, 2023
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

No branches or pull requests

2 participants