PUGX / badge-poser

The PHP badges, renders some badges for your readme with the packagist information.
https://poser.pugx.org
MIT License
476 stars 93 forks source link

The unstable badge is not compatible with git-flow #91

Closed axelitus closed 10 years ago

axelitus commented 10 years ago

The unstable version is not compatible with Git Flow, as the branch that is always displayed as unstable is dev master, but Git Flow's unstable branch is dev develop.

Is there a way to specify what the unstable version is or from which branch is the default unstable?

liuggio commented 10 years ago

Hi axelitus, thanks for reporting, the intent of badge poser is be compatible with packagist, I think you could solve using (I'm not sure really :) )

        "branch-alias": {
            "dev-develop": "1.0-dev",
            "dev-master":"0.9-dev"
        }
axelitus commented 10 years ago

I'll try it, but as I understand the way to do this is to establish an alias for master that's always behind the alias for dev-develop? Am I correct?

liuggio commented 10 years ago

:+1:

axelitus commented 10 years ago

Wouldn't it be good to have:

"extra": {
    "poser-badge": {
        "unstable": "dev-develop"
    }
}

Or is it too much for just this? I mean it would be certainly more "flexible" and semantic (as having an un-needed branch alias for master is not the best of solutions) but my question is "would it be worth it?"

axelitus commented 10 years ago

Or just something in the lines of:

"extra": {
    "unstable": "dev-develop"
}
liuggio commented 10 years ago

:-1:

The goal is not to communicate to badge-poser which is the latest unstable version but to packagist.

If you are using git-flow master is the production so master could be stable :)

https://github.com/PUGX/badge-poser/blob/master/src/PUGX/BadgeBundle/Service/PackageManager.php#L111

axelitus commented 10 years ago

Yeah I have stable version but using tags :)

Anyone I'll just try with branch-alias.

Thanks!

axelitus commented 10 years ago

The code you propose:

"branch-alias": {
    "dev-develop": "1.0-dev",
    "dev-master":"0.9-dev"
}

should be placed at what level? Inside the "extra" key? or at the same level as "extra"? (I ask because it did not work as expected, I'm placing the entries inverted, as I placed dev-master first and then dev-develop (though I don't think that should matter).

liuggio commented 10 years ago

sorry I've missed this comment... which is the repository?

axelitus commented 10 years ago

Hi, the repository is: axelitus/php-base