Skip to content

Regex version sourceRegexバージョンソース


See the documentation for versioning.バージョン管理に関するドキュメントを参照してください。

Updates更新

Setting the version is supported.バージョンの設定がサポートされています。

Configuration設定

The version source plugin name is regex.バージョンソースプラグイン名はregexです。

[tool.hatch.version]
source = "regex"
[version]
source = "regex"

Optionsオプション

Optionオプション Description説明
path (required)path(必須) A relative path to a file containing the project's versionプロジェクトのバージョンを含むファイルへの相対パス
patternpattern A regular expression that has a named group called version that represents the version. The default pattern looks for a variable named __version__ or VERSION that is set to a string containing the version, optionally prefixed with the lowercase letter v.バージョンを表すversionという名前のグループを持つ正規表現。デフォルトのパターンは、バージョンを含む文字列に設定された__version__またはVERSIONという名前の変数を探し、オプションで小文字のvでプレフィックスが付けられています。