Skip to main content

Module git_tag

Module git_tag 

Source
Expand description

从 Git tag 读取版本号,作为版本号的事实源之一。

§事实源定位

本模块提供的是事实(scope 名和版本号当前是什么),不涉及规则判断。 规则的判定在 contract::version 中。

§架构

通过 TagSource trait 将 I/O(读取 tag)与业务逻辑(过滤、排序)分离。

§示例

use quanttide_devops::source::git_tag::latest_tag;
let tag = latest_tag(repo_path, "cli")?;

Structs§

GixTagSource
gix 实现的 TagSource

Enums§

TagError
Git tag 读取操作错误。

Traits§

TagSource
Tag 列表的抽象来源。

Functions§

filter_latest_tag
从 tag 列表中选出指定 scope 的最新版本,标准化后返回。
filter_tags_by_scope
从 tag 列表中过滤出指定 scope 的 tag。
latest_tag
获取指定 scope 的最新 tag,标准化后返回。
latest_tag_with
带注入 TagSourcelatest_tag
tags_for_scope
获取指定 scope 的所有 tag(原始格式)。
tags_for_scope_with
带注入 TagSourcetags_for_scope