sebastianbergmann

version

sebastianbergmann

Library that helps with managing the version number of Git-hosted PHP projects

AI 简介

这是一个用于管理 Git 托管 PHP 项目版本号的轻量级库。它通过读取 Git 仓库的提交信息(如 `git describe --tags`),自动构建包含版本号、提交距最近 tag 距离及短哈希的语义化版本字符串,支持 `X.Y.Z` 和 `X.Y` 两种发布系列格式,并能优雅降级处理非 Git 环境。核心特点是零依赖、无运行时副作用、仅提供单类单方法接口,适用于 PHP 库/框架的版本信息生成、Composer 包元数据填充及 CI 构建时动态版本标注等场景。

PHP
BSD 3-Clause "New" or "Revised" License
6.6k
Stars
36
Forks
9
Watchers
1
Issues

Star 增长

今日0
近 7 天0
近 30 天0
综合评分60.7
默认分支main