Reputation: 19695
I have just published my first Laravel plugin with composer and Packagist.
Now, How should I manage version???
When I push my Git, I should be able to make a
composer update
and get the changes, but I couldn't do it.
I saw a lot of plugin that has no "version" field in the composer.json, but have versions in packagist...
I tried to tag my branch with v0.7.1 but it didn't resolve automatically...
How should I get my pushes with composer update?
EDIT:
I changed it, but composer update still doesn't do anything :(
Upvotes: 4
Views: 364
Reputation: 32232
0.7.1
not v0.7.1
Tags are not pushed by default.
By default, the git push command doesn’t transfer tags to remote servers. You will have to explicitly push tags to a shared server after you have created them. This process is just like sharing remote branches – you can run git push origin [tagname].
...
If you have a lot of tags that you want to push up at once, you can also use the --tags option to the git push command. This will transfer all of your tags to the remote server that are not already there.
Using git tags has the added benefit of automagic zip dist generation at git hosts like Github and Gitlab, which are picked up by packagist and rolled into your package info.
Update the package at packagist, wait a lil bit for the repo itself to update, and run composer clearcache
in the meantime.
Upvotes: 4