feat: ハッシュ計算のブラッシュアップ#3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ver のハッシュ計算対象と
ver updateの採番基準を見直しました。特に、ver.toml に未コミットの版上げが残っている場合でも、HEAD にあるバージョン情報を基準に次バージョンを決めるようにして、意図しない連番の進みすぎを防ぎます。HEAD に
ver.tomlがない場合はnext_version()による初期採番を使います。変更内容
*.py+uv.lock固定から、git ls-filesベースの追跡済み・変更済み・未追跡ファイルに拡張ver.tomlは常にハッシュ対象から除外uv.lockは必須入力として扱い、存在しない・git ls-filesに含まれない場合はエラーに変更ver.tomlにexclude_patterns/no_default_exclude_patternsを追加し、ハッシュ対象を設定で制御可能に変更tests/README.md,AGENTS.md,CLAUDE.mdLICENSE.*ver update/ver checkが上記除外設定を使ってハッシュを計算するように変更ver update時の採番基準を変更ver.tomlがある場合: HEAD の version を基準にnext_version(...)ver.tomlがない場合:next_version()を使用背景
これまでは
ver updateが作業ツリー上のver.tomlをそのまま基準に採番していたため、未コミットの版上げが残っていると、その値からさらに版が進んでしまうことがありました。今回の変更で、採番は常にコミット済み状態を基準にしつつ、sha256 自体は作業ツリーの最新内容を反映します。