Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How create version of a package on github and packagist? PHP Specific

Tags:

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?

like image 404
Fabrizio Fenoglio Avatar asked Apr 15 '14 17:04

Fabrizio Fenoglio


People also ask

How do I add packages to Packagist?

To submit a package to Packagist, first create an account open in new window and then use the Submit link open in new window and specify the public repository URL to the git repository of your package. Packagist will now host a so-called dev-master version of your package.

What is private Packagist?

Private Packagist is a commercial package hosting product offering professional support and web based management of private and public packages, and granular access permissions.


1 Answers

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.

like image 163
Sven Avatar answered Sep 20 '22 03:09

Sven