-
Notifications
You must be signed in to change notification settings - Fork 32
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
New getLastTag logic doesn't find my beta tags #48
Comments
Hi, the new logics been implemented on #46, and on #47 been readapted to work with
and here php-conventional-changelog/src/Changelog.php Line 370 in 92e3adb
I'll work on it. |
Thanks, I can do it now with specifying from tag and new version manually, but I would be easier with the fixed logic :) |
Should be solved on 1.15.5, let me know if all works fine. |
@marcocesarato Sorry, I could check it now. I've updated to the lastest version, and the situation is the same. It throws an error: It seems that it doesn't find the previous tag :/ |
@marcocesarato Maybe I can try to help with a PR tomorrow, or next week. |
@adambalint-srg I tried to replicate the error using the last version (v1.15.6). Maybe I'm missing something else?
Yes thanks, it would be greatly appreciated |
@marcocesarato Strange, I also tried it on the same branch, the result is the same, it tries to find the 0.0.0 version, because it doesn't find alpha/beta tags. I've tried with debug, and found this situation: php-conventional-changelog/src/Git/Repository.php Lines 73 to 74 in 8cb6ec0
$tagsArray contains every tags:
array (
0 => 'v2.0.0-beta.10',
1 => 'v2.0.0-beta.9',
...
23 => 'v2.0.0-alpha.0',
28 => 'master',
29 => 'hotfixes'
)
v and doesn't contain - . With this all of our alpha/beta tags will be filtered out. And the $tagsFound array will be empty.Why this filter is there? I've tried it with a clean repo, and yes, the version number is updated in composer.json (packageBump is turned off in my other project), and the changlog contains the correct version, but the history of the changelog entry is empty, and the generated diff link is from the version 0.0.0 With debug the situation is the same, in getLastTag it doesn't find the first tag, and it throws an error in console output:
I've opened a PR for this, I think removing the |
I found the problem, was in another part of the code where it wasn't implemented well for some cases. |
@marcocesarato I can confirm that it's OK now! Thanks for the fix :) |
The new logic which was implemented in #47 by @marcocesarato doesn't find previous beta tags. In my repository I have only alpha and beta versions now, like
v2.0.0-beta.8
. I don't have v2.0.0 now, because the code is not in this phase yet.But the
preg_grep
fiters out every tag which contains-
php-conventional-changelog/src/Git/Repository.php
Line 74 in 92e3adb
Why this logic was implemented? I can't create v2.0.0-beta.9 version because of this logic.
The text was updated successfully, but these errors were encountered: