Skip to content

Commit 70a8582

Browse files
committed
Replace log.Info with log.Infof for formatted logging in update process
1 parent 8b8ec68 commit 70a8582

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/cli/alpha/internal/update/update.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,23 @@ func (opts *Update) Update() error {
7373
// 3. Installs old release
7474
// 4. Runs alpha generate with old release binary
7575
// 5. Commits the result
76-
log.Info("Preparing Ancestor branch with name %s", opts.AncestorBranch)
76+
log.Infof("Preparing Ancestor branch with name %s", opts.AncestorBranch)
7777
if err := opts.prepareAncestorBranch(); err != nil {
7878
return fmt.Errorf("failed to prepare ancestor branch: %w", err)
7979
}
8080
// 1. Creates original branch
8181
// 2. Ensure that original branch is == Based on user’s current base branch content with
8282
// git checkout "main" -- .
8383
// 3. Commits this state
84-
log.Info("Preparing Original branch with name %s", opts.OriginalBranch)
84+
log.Infof("Preparing Original branch with name %s", opts.OriginalBranch)
8585
if err := opts.prepareOriginalBranch(); err != nil {
8686
return fmt.Errorf("failed to checkout current off ancestor: %w", err)
8787
}
8888
// 1. Creates upgrade branch from ancestor
8989
// 2. Cleans up the branch by removing all files except .git and PROJECT
9090
// 2. Regenerates scaffold using alpha generate with new version
9191
// 3. Commits the result
92-
log.Info("Preparing Upgrade branch with name %s", opts.UpgradeBranch)
92+
log.Infof("Preparing Upgrade branch with name %s", opts.UpgradeBranch)
9393
if err := opts.prepareUpgradeBranch(); err != nil {
9494
return fmt.Errorf("failed to checkout upgrade off ancestor: %w", err)
9595
}
@@ -98,7 +98,7 @@ func (opts *Update) Update() error {
9898
// 2. Merges in original (user code)
9999
// 3. If conflicts occur, it will warn the user and leave the merge branch for manual resolution
100100
// 4. If merge is clean, it stages the changes and commits the result
101-
log.Info("Preparing Merge branch with name %s and performing merge", opts.MergeBranch)
101+
log.Infof("Preparing Merge branch with name %s and performing merge", opts.MergeBranch)
102102
if err := opts.mergeOriginalToUpgrade(); err != nil {
103103
return fmt.Errorf("failed to merge upgrade into merge branch: %w", err)
104104
}

0 commit comments

Comments
 (0)