2017-05-16 153 views
0

我有一个自定义包通过composer.json注入到我的项目中,这个包当前在版本2.0.1 我在包的源代码中改变了一些东西,并在包中设置了版本。 JSON 2.0.2推它Git和尝试更新我的作曲家,但每一次我得到作曲家使用旧包版本

 - Installing myproject/laravel-jssettings (v2.0.1): Cloning 9663e29ee0 from cache 

即使寿我清除作曲家缓存和删除的文件composer.lock

在我的作曲家线.json文件是

"myproject/laravel-jssettings": "~2.0", 

我试着将它设置为

"myproject/laravel-jssettings": "2.0.2", 

但后来我得到它说

 Problem 1 
- The requested package myproject/laravel-jssettings 2.0.2 exists as myproject/laravel-jssettings[v2.0.0, v2.0.1] but these are rejected by your constraint. 

什么我想念这里,我一定要清除缓存或更改的错误消息一个新版本,以便作曲家获得新的2.0.2版本。 thx

+0

确保您已经创建了该软件包的新版本,不要忘记更新您的packagist回购 – hassan

回答

1

您需要为您的自定义存储库创建一个tag。之后,标签将被推送到存储器,作曲家将获得更新。

git tag 2.0.2 
git push origin --tags 

之后尝试对作品进行作曲家更新。 Composer documentation

+0

这样做,非常感谢! – mimzee