如何测试/安装未标记版本的作曲家软件包? [英] How can I test/install an untagged version of a composer package?
本文介绍了如何测试/安装未标记版本的作曲家软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在本地主机上测试我的私有composer软件包,而无需提交新标签来执行测试。
I would like to test my private composer package on localhost without the need to commit a new tag to perform the test.
我的软件包树
├── composer.json
├── README.md
└── src
├── Controllers
│
├── Models
├── Providers
│ └── RouteGenericServiceProvider.php
├── Repositories
├── Routes
│ └── generics.php
├── Services
│
└── Transformers
推荐答案
作为建议的@Matteo的替代方案,可以使用内联别名
As an alternative to what is suggested bey @Matteo, you can use an inline alias and reference a commit hash instead of a tag.
假定 xyz
是您当前安装的版本,而#123abc
是成功测试后将标记的提交的哈希值(可能是 HEAD
的任何分支)您要测试),然后运行:
Assume that x.y.z
is the version you have currently installed, and #123abc
is the hash of the commit you would tag once successfully tested (probably HEAD
of whatever the branch is you want to test), then run:
$ composer require "my/package:dev-master#123abc as x.y.z"
,请参见:
- https://getcomposer.org/doc/articles/aliases.md#require-inline-alias
这篇关于如何测试/安装未标记版本的作曲家软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文