GithubHelp home page GithubHelp logo

Comments (9)

marcocesarato avatar marcocesarato commented on May 11, 2024

Hi, the new logics been implemented on #46, and on #47 been readapted to work with --merged flag.
You right, I see some missing logics on #46 that need to be adjusted on

public static function getLastBetaTag(string $lastTag = ''): ?string

and here
$extraRelease = Repository::getLastBetaTag($newVersion);

I'll work on it.

from php-conventional-changelog.

adambalint-srg avatar adambalint-srg commented on May 11, 2024

Thanks, I can do it now with specifying from tag and new version manually, but I would be easier with the fixed logic :)

from php-conventional-changelog.

marcocesarato avatar marcocesarato commented on May 11, 2024

Should be solved on 1.15.5, let me know if all works fine.

from php-conventional-changelog.

adambalint-srg avatar adambalint-srg commented on May 11, 2024

@marcocesarato Sorry, I could check it now. I've updated to the lastest version, and the situation is the same.
I have this existing tag: v2.0.0-beta.10
I run the changelog generation with this command: vendor/bin/conventional-changelog --beta

It throws an error: fatal: ambiguous argument '0.0.0...HEAD': unknown revision or path not in the working tree.

It seems that it doesn't find the previous tag :/

from php-conventional-changelog.

adambalint-srg avatar adambalint-srg commented on May 11, 2024

@marcocesarato Maybe I can try to help with a PR tomorrow, or next week.

from php-conventional-changelog.

marcocesarato avatar marcocesarato commented on May 11, 2024

@adambalint-srg I tried to replicate the error using the last version (v1.15.6).
I created a tag v1.0.0-beta.1 on a repository and executed conventional-changelog --beta, the result been v1.0.0-beta.2.
These tags were both on the same branch. I haven't tried it on various branches, but I don't believe it would be an issue.

Maybe I'm missing something else?

@marcocesarato Maybe I can try to help with a PR tomorrow, or next week.

Yes thanks, it would be greatly appreciated

from php-conventional-changelog.

adambalint-srg avatar adambalint-srg commented on May 11, 2024

@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:

$tagsArray = explode(self::$delimiter . "\n", $tags);
$prefixQuote = preg_quote($prefix);
The $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'
)

$tagsFound = preg_grep('/^' . $prefixQuote . '[^-]*$/', $tagsArray);
But in line 76 it filters this array, and find items which starts with 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 https://github.com/ownser/repository/compare/0.0.0...v2.0.0-beta.11

With debug the situation is the same, in getLastTag it doesn't find the first tag, and it throws an error in console output:

fatal: ambiguous argument '0.0.0...HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

I've opened a PR for this, I think removing the - condition from regex won't cause problems.

from php-conventional-changelog.

marcocesarato avatar marcocesarato commented on May 11, 2024

I found the problem, was in another part of the code where it wasn't implemented well for some cases.
Released on 1.16.0. Let me know if now it works.

from php-conventional-changelog.

adambalint-srg avatar adambalint-srg commented on May 11, 2024

@marcocesarato I can confirm that it's OK now! Thanks for the fix :)

from php-conventional-changelog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.