문제

I created a package for laravel 4 framework and pushed it on github and packagist.

For installing it, it require the dev-master version on my composer, but I would like have it as version 1.0 how can I do that?

In the future I'll add some staff on my package and I will need to upgrade the version as well, which is the logic to manage the version of our package?

도움이 되었습니까?

해결책

Tag the commit you want to release as a version in your Git repo, push the tags to Github. Works on every repo as advertised. It might be a good idea to stick to semantic versioning, so make a version number from three parts: 1.0.0, and increment them according to your changes.

Enable the post-push hook on Github to alert Packagist when you pushed - otherwise there will be more delay on Packagist to see the new versions.

And that should be it.

Please make sure you instruct your users to require a tagged version, do not advise them to use "dev-master". And tag a new version as soon as possible if you collected a substantial amount of new features or bug fixes.

다른 팁

type

 git tag v1.0.0

then

git push --tags -u origin {branch name}

And don't forget that you can always change the version number based on each stage of your project, but always follow this format v{0.0.0}. it helps to add more meaning to every stages of your project.

I faced an issue with package versions of package: when I created a release on Github, but the new tag did not appear on Packagist. Solution was simple: I added a LICENSE file to the repo and created new release.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top