如何获得Composer从GitHub的master分支中下载最新提交的软件包? [英] How do I get Composer to download the latest commit in the master branch from GitHub for a package?

查看:87
本文介绍了如何获得Composer从GitHub的master分支中下载最新提交的软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让Composer下载Behat / MinkSelenium2Driver软件包的最新提交。该特定的回购只有一个master分支。我尝试了所有我能想到的方法,包括删除文件并将其拉回,以使其正常工作,但没有成功。



我可以获取最新提交的文件,或者至少从下面列出的提交文件中提取文件吗?



具体来说,我想获取此提交文件:
https://github.com/Behat/MinkSelenium2Driver/commit/2e73d8134ec8526b6e742f05c146> b

谢谢,
Patrick

只有一种方法可以抓住存储库:

  require:{ behat / mink-selenium2-driver: dev-master} 
最低稳定性:开发

哦,至少有两种方法:

  require:{ behat / mink-selenium2-driver: dev-master as 1.1.x-dev} 
最小稳定性:开发

大概至少三种方式:

  require:{ behat / mink-selenium2-driver: dev-master#2e73d8134ec8526b6e742f05c146fec2d5e1b8d6} 
最小稳定度: dev

由于该存储库实际上将master分支的别名为1.1.x-dev,因此它在不影响所有其他软件包的最小稳定性的情况下也可以工作:

 要求:{ behat / mink-selenium2-driver: 1.1.*@dev} 


I am trying to get Composer do download the latest commit for the Behat/MinkSelenium2Driver package. That particular repo only has a master branch. I have tried every method I can think of, including deleting the files and letting it pull them back in, to get it to work but it doesn't.

How would I get it to pull in latest committed files or at least those from the commit I list below?

Specifically I want to get this commit: https://github.com/Behat/MinkSelenium2Driver/commit/2e73d8134ec8526b6e742f05c146fec2d5e1b8d6

Thanks, Patrick

解决方案

There is only one way to grab the head of the repository:

"require": { "behat/mink-selenium2-driver" : "dev-master" }
"minimum-stability": "dev"

Oh well, at least two ways:

"require": { "behat/mink-selenium2-driver" : "dev-master as 1.1.x-dev" }
"minimum-stability": "dev"

Probably at least three ways:

"require": { "behat/mink-selenium2-driver" : "dev-master#2e73d8134ec8526b6e742f05c146fec2d5e1b8d6" }
"minimum-stability": "dev"

Because that repository actually aliased the master branch as 1.1.x-dev, this would also work without the minimum-stability affecting all other packages:

"require": { "behat/mink-selenium2-driver" : "1.1.*@dev" }

这篇关于如何获得Composer从GitHub的master分支中下载最新提交的软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆