Add fatal missing-version handling with opt-out flag
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-01 13:11:33 +03:00
parent f9865168c9
commit 123cd38a18
4 changed files with 56 additions and 12 deletions

View File

@@ -86,7 +86,12 @@ func gitCommit(bc *BumpConfig, newVersion string, configPath string) {
log.Fatalf("Stat error for %s: %v", p, err)
}
st := status[p]
st, ok := status[p]
if !ok || st == nil {
// nothing to stage for this file
continue
}
if st.Worktree != git.Unmodified {
if _, err := worktree.Add(p); err != nil {
log.Fatalf("Add %s error: %v", p, err)