承接 neilmasters/semanticreleases 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

neilmasters/semanticreleases

最新稳定版本:v1.0.0

Composer 安装命令:

composer require neilmasters/semanticreleases

包简介

Utility to manage semantic release versions

README 文档

README

The SemanticReleases contains utilities to help maintain semantic release versions.

Versioning()

Encapsulates functionality around bumping version numbers. Versioning::gerIncreasedVersion() Will accept a current version and increase it depending on it being a major, minor or fix change.

Example usage:

$versioning = new \SemanticReleases\Util\Versioning();
$versioning->getIncreasedVersion('1.0.0'); // $increaseType defaults to major bump 2.0.0
$versioning->getIncreasedVersion('1.0.0', \SemanticReleases\Util\Versioning::MINOR); // 1.1.0
$versioning->getIncreasedVersion('1.0.0', \SemanticReleases\Util\Versioning::FIX); // 1.0.1

You can view the unit tests to see every possible combination you can throw at the getIncreasedVersion() method.

Bad version values

To facilitate conversion from one format to another getIncreasedVersion() will do a lot of work to try and convert the passed version to a semantic format.

In the event that a version passed does not follow major.minor.fix or is just completely wrong, the getIncreasedVersion() method will fix it at best or at worst just give you back a 1.0.0 version.

Examples of non standard input:

$versioning = new \SemanticReleases\Util\Versioning();
$versioning->getIncreasedVersion(1); // 2.0.0
$versioning->getIncreasedVersion(1.1); // 2.0.0
$versioning->getIncreasedVersion('a'); // 1.0.0
$versioning->getIncreasedVersion('a.b'); // 1.0.0
$versioning->getIncreasedVersion('a.b.c'); // 1.0.0

To summarise, you will get a correct major.minor.fix version number, regardless what you throw at it. Now, if that is the value you wanted is a different matter.

Empty version

In the event of an empty version we convert it to 0 so the returned version will be 1.0.0. Useful if you are initialising versions.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固