You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way of knowing if bump detected an increment? #18
cz bump throws an error code different than 0, this means that most pipelines will be interrupted.
If you are writing a POSIX shell script, you can do something like:
#!/bin/sh -eif cz bump;thenecho'it was bumped correctly'elseecho"there was an error, whose error code is $?"exit 3 # 3 is the error code thrown by no commits foundfi
Nice catch, it is actually a bug on commitizen, not on this github action, I've submitted a PR to cz.
An error code should be returned instead (I think). (If) Once merged, it should solve this issue.
Activity
woile commentedon Jan 16, 2022
cz bumpthrows an error code different than0, this means that most pipelines will be interrupted.If you are writing a POSIX shell script, you can do something like:
m0wer commentedon Jan 16, 2022
Thanks for your answer @woile. Unfortunately, it looks like
cz bumpreturns0even if no increment is detected. Example:And the same result happens when using this action in a workflow: https://github.com/now8-org/app/runs/4832942786?check_suite_focus=true (check the commitizen step output).
woile commentedon Jan 16, 2022
Nice catch, it is actually a bug on commitizen, not on this github action, I've submitted a PR to cz.
An error code should be returned instead (I think). (If) Once merged, it should solve this issue.
commitizen-tools/commitizen#473
Thanks for reporting
woile commentedon Jan 17, 2022
Can you test with the latest version?
Thanks
m0wer commentedon Jan 17, 2022
It's working now. Thanks.
In case it helps anyone what I did to condition the execution of subsequent steps was:
ci(main): ignore commiizen error no bump
ci(main): ignore commitizen error no bump